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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
yishenhui
Helper II
Helper II

calculate variance of measure

Hi,

 

I want to calculate variance of a measure. The measure is 

%ofcapacitybasedondaysworked =
sumx(SUMMARIZE(DataQuery,DataQuery[AnalytName],"Documented",SUM(DataQuery[Time Spent Day (H)]))
,[Documented])   /sumx(SUMMARIZE(DataQuery,DataQuery[AnalytName],"DayXWorked",DISTINCTCOUNT('DataQuery'[Day])*sum('ContactsCapacityQuery'[Hours]))
,[DayXWorked])
It was re-written as I thought it could be grouped by analytName. However, when I use it in the measure of variance, it seems doesn't work. The measure of variance is 
Variance of Documented =
var temptable=ADDCOLUMNS('DataQuery',"analytname1",DataQuery[AnalytName],
"%cap",sumx(SUMMARIZE(DataQuery,DataQuery[AnalytName],"Documented",SUM(DataQuery[Time Spent Day (H)]))
,Documented])
 /sumx(SUMMARIZE(DataQuery,DataQuery[AnalytName],"DayXWorked",DISTINCTCOUNT('DataQuery'[Day])*sum('ContactsCapacityQuery'[Hours]))
,[DayXWorked]))
   return
Varx.p(temptable,[%cap])
 
The results of variance are all zero. It supposes have some non-zero numbers (like the seconds screenshots from exported data and variance from columns)
What is wrong of my DAX?
 
Thanks
 
image.pngimage.png
 
 
0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.