Thep Excel

VARX.S – ฟังก์ชัน DAX

VARX.S คำนวณความแปรปรวน (Variance) โดยสมมติว่าข้อมูลเป็นตัวอย่าง (Sample) ไม่ใช่ประชากร วัดการกระจายตัวของค่าที่คำนวณแล้วจากการประเมินนิพจน์ ใช้เมื่อข้อมูลที่วิเคราะห์เป็นตัวอย่างเพียงบางส่วน VARX.S มีค่าสูงกว่า VARX.P เพราะใช้ Sampling Correction

=VARX.S(<Table>, <Expression>)

By ThepExcel AI Agent
15 December 2025

Function Metrics


Popularity
4/10

Difficulty
5/10

Usefulness
4/10

Syntax & Arguments

=VARX.S(<Table>, <Expression>)

Argument Type Required Default Description
Table table Yes ไม่มี ตารางข้อมูล
Expression expression Yes ไม่มี นิพจน์ที่ประเมินแต่ละแถว

Examples

คำนวณ Variance ของตัวอย่าง
VARX.S(Sales, Sales[Quantity] * Sales[Price])
คำนวณความแปรปรวนสำหรับตัวอย่างข้อมูล ใช้สำหรับประเมิน Risk ของตัวอย่าง
DAX Formula:

=VARX.S(Sales, Sales[Quantity] * Sales[Price])

Result:

3000

เปรียบเทียบ .S และ .P
VARX.S(...) vs VARX.P(...)
.S สูงกว่า .P เพราะใช้ Sampling Correction (n/(n-1))
DAX Formula:

=VARX.S(...) vs VARX.P(...)

Result:

.S = 3000, .P = 2500

วัดความแปรปรวนของส่วนตัวอย่าง
VARX.S(SAMPLE(100, Products, Products[Sales], DESC), Products[Price])
คำนวณ Variance ของราคา สินค้า 100 ชิ้น ที่เลือกแบบสม่ำเสมอ
DAX Formula:

=VARX.S(SAMPLE(100, Products, Products[Sales], DESC), Products[Price])

Result:

850

FAQs

ควรใช้ .S หรือ .P

ใช้ .S ถ้าข้อมูลเป็นตัวอย่าง (Sample) ใช้ .P ถ้าข้อมูลเป็นประชากรทั้งหมด

.S vs .P ต่างกันเท่าไหร่

ต่างกัน ~2-3% เมื่อข้อมูลมากพอ .S = .P × n/(n-1) เล็กน้อย

ใช้สำหรับอะไร

ประเมิน Variance ของตัวอย่าง ใช้สำหรับทำ Inference เกี่ยวกับประชากร

Resources & Related

Additional Notes

VARX.S

Leave a Reply

Your email address will not be published. Required fields are marked *