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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
mitchellericio
New Member

average, std deviation and Z statistic

Hi Experts,

 

I am trying to do some analysis on volumes per headcount on our data. Put in the DAX measures but somehow it is not agreeing with the manual formula checks am doing.  Currently the data model is in Power Pivot in excel.

Here is a snipshot of the pivot and the manual computation I did( below the pivot).

 

Pivot tablePivot table

DAX formulas:

 

Quotes / HC:=CALCULATE(

DIVIDE(

'Measures_Quotes Created'[Quotes_Created],

HeadCountMeasures[Total_NonSupHC],

0

),

YEAR(Months[Month]) = 2023

)

 

Avg_Quotes/HC:=CALCULATE(

DIVIDE(

SUMX(

'Volume Table',

DIVIDE(

'Volume Table'[Sum of Volume],

HeadCountMeasures[Total_NonSupHC],0)

 

),

 

DISTINCTCOUNT(Months[Month]),

0

),

// Implement Filtering

ALL(Months[Month]),

YEAR(Months[Month]) = 2023,

'Volume Table'[Attribute] = "Sum of Quotes Created"

)

 

StdDev_Avg_Quotes/HC:=CALCULATE(

STDEVX.S(

'Volume Table',

DIVIDE(

'Volume Table'[Sum of Volume],

HeadCountMeasures[Total_NonSupHC],

0

)

),

// Implement Filtering

ALL(Months[Month]),

YEAR(Months[Month]) = 2023,

'Volume Table'[Attribute] = "Sum of Quotes Created"

)

 

zQuotes/HC:=CALCULATE(

DIVIDE(

DIVIDE(

'Measures_Quotes Created'[Quotes_Created],

HeadCountMeasures[Total_NonSupHC],

0

) - zMeasures_Quotes_Created[Avg_Quotes/HC],

zMeasures_Quotes_Created[StdDev_Avg_Quotes/HC],

0)

)

 

The data model consist of a Volume table, a headcount table and the months (date) table.

Hope you can help me.

 

1 REPLY 1
Anonymous
Not applicable

Hi  @mitchellericio ,

 

Are you referring to customizing the values based on the Column of the matrix, which you can do with the Switch function.

Measure =
SWITCH(
    TRUE(),
    MAX('Table'[Manual])="Zstat",1,
    MAX('Table'[Manual])="Quote/HC",2,
    MAX('Table'[Manual])="AvgQuotes/HC",3,
    MAX('Table'[Manual])="Zstat",4)

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.