---
title: Cube.ReplaceDimensions – แทนที่ Dimensions
url: https://www.thepexcel.com/functions/power-query/accessing-data-functions/cube-replacedimensions/
type: function-explainer
program: Power Query
syntax: cube_replacedimensions(value as any) as any
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 2
  difficulty: 6
  usefulness: 2
---

# Cube.ReplaceDimensions – แทนที่ Dimensions

> แทนที่ Dimensions

## คำอธิบาย

Cube.ReplaceDimensions แทนที่ dimensions ในคิวบ์ด้วย dimensions อื่น

## Syntax

```excel
cube_replacedimensions(value as any) as any
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| value | Yes | any |  | ค่าที่ต้องการประมวลผล |

## ตัวอย่าง

### 1. ตัวอย่างที่ 1

```excel
cube_replacedimensions(data)
```

**ผลลัพธ์:** `ผลลัพธ์`

การใช้งานพื้นฐาน

### 2. ตัวอย่างที่ 2

```excel
cube_replacedimensions(#date(2025,12,12))
```

**ผลลัพธ์:** `true`

ใช้กับวันที่

### 3. ตัวอย่างที่ 3

```excel
let result = cube_replacedimensions(today) in result
```

**ผลลัพธ์:** `ผลลัพธ์สุดท้าย`

ใช้ในสูตร let...in

## หมายเหตุเพิ่มเติม

⚠️ ฟังก์ชันนี้ใช้สำหรับการตรวจสอบวันที่

## คำถามที่พบบ่อย

**Q: ฟังก์ชันนี้ใช้สำหรับอะไร**

Cube.ReplaceDimensions แทนที่ dimensions ในคิวบ์ด้วย dimensions อื่น

**Q: ข้อมูลส่งเข้าจำเป็นต้องมีรูปแบบไหน**

ข้อมูลต้องเป็นค่าวันที่ (date) หรือวันที่และเวลา (datetime)

## แหล่งข้อมูลเพิ่มเติม

- [Microsoft Learn: Power Query M](https://learn.microsoft.com/en-us/powerquery-m/cube-replacedimensions) _(documentation)_

---

_Source: [https://www.thepexcel.com/functions/power-query/accessing-data-functions/cube-replacedimensions/](https://www.thepexcel.com/functions/power-query/accessing-data-functions/cube-replacedimensions/)_
