cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmanSShergill Frequent Visitor
Frequent Visitor

Can PowerBi give me Z-Scores

Hi,

 

I have a large dataset linked into powerbi which is currently creating me great dashboards.

However, is it possible for PowerBi to give me Z scores on certain variables based on others:

       Example - Z-Score for Person A's total steps for today compared to a normal Thursday.

 

I do not have the Z values in the raw dataset - im looking for PowerBi to create it itself and then plot it in my charts.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-caliao-msft
Moderator

Re: Can PowerBi give me Z-Scores

@AmanSShergill,

 

Based on my reserach, there is a function to return Z-Score directly. We need to calculated in DAX.

Mean = CALCULATE(AVERAGE(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))

StandardDeviation = CALCULATE(STDEV.P(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))

Z-Score column = (Table1[Steps]-Table1[Mean])/Table1[StandardDeviation]

 

measure

Z-Score measure =
var mean = CALCULATE(AVERAGE(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))
var StandardDeviation = CALCULATE(STDEV.P(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))
return (SUM(Table1[Steps])-mean)/StandardDeviation

Capture.PNG

Regards,

Charlie Liao

 

 

View solution in original post

2 REPLIES 2
Moderator v-caliao-msft
Moderator

Re: Can PowerBi give me Z-Scores

@AmanSShergill,

 

Based on my reserach, there is a function to return Z-Score directly. We need to calculated in DAX.

Mean = CALCULATE(AVERAGE(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))

StandardDeviation = CALCULATE(STDEV.P(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))

Z-Score column = (Table1[Steps]-Table1[Mean])/Table1[StandardDeviation]

 

measure

Z-Score measure =
var mean = CALCULATE(AVERAGE(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))
var StandardDeviation = CALCULATE(STDEV.P(Table1[Steps]),ALLEXCEPT(Table1,Table1[WeekDayName]))
return (SUM(Table1[Steps])-mean)/StandardDeviation

Capture.PNG

Regards,

Charlie Liao

 

 

View solution in original post

nadavsn Regular Visitor
Regular Visitor

Re: Can PowerBi give me Z-Scores

thanks a lot, Charlie 

you really helped me. 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors