Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Nie
Helper I
Helper I

Get p value from Independent Sample T-Test

Like this thread: https://community.powerbi.com/t5/Desktop/How-to-replicate-T-TEST-excel-function-in-powerBI/m-p/28663... I am also trying to replicate Excel's t.test using DAX.

 

One of the info in that thread is this: https://datakuity.com/2022/02/07/paired-t-test-in-power-bi-using-dax/#P-value. Unfortunately, it is a bit too complex for me to understand. I'm also not good at statistics.

 

I did manage to replicate this: https://www.statisticshowto.com/probability-and-statistics/t-distribution/independent-samples-t-test.... With the t value here, is it correct to use T.DIST.2T(t value, deg of freedom) to get the p value?

1 ACCEPTED SOLUTION
Nie
Helper I
Helper I

I've done some testing using Scipy in Python to check the results. T.DIST.2T does appear to give the p value if you can provide the t statistic. Why there is a T.DIST.2T but not a T.TEST in DAX is puzzling. It strongly implies the T.DIST.2T in DAX does something very different. I'll mark this as the "Solution" until I figure how what exactly T.DIST.2T does, why T.TEST is missing, and why I am forced to manually calculate the t-statistic.

View solution in original post

4 REPLIES 4
Nie
Helper I
Helper I

I've done some testing using Scipy in Python to check the results. T.DIST.2T does appear to give the p value if you can provide the t statistic. Why there is a T.DIST.2T but not a T.TEST in DAX is puzzling. It strongly implies the T.DIST.2T in DAX does something very different. I'll mark this as the "Solution" until I figure how what exactly T.DIST.2T does, why T.TEST is missing, and why I am forced to manually calculate the t-statistic.

lbendlin
Super User
Super User

@Greg_Deckler Did you ever get around to add that to your conversion list?

@lbendlin @Nie Unfortunately no, the documentation was so bad I have no idea what the heck that function is doing internally so I didn't know how to replicate it. I'll revisit and do some research on it and try to figure it out.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , Did you find anything on calculating the p-value in Power BI?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.