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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to get Grand Total on Measure Table

Hi,

The Grand Total of each row in the measure table  is incorrect.

How can I fix it? Sample here.

 

PBI_newuser_0-1613695266043.png

 

4 REPLIES 4
amitchandak
Super User
Super User

@PBI_newuser , Try calculations like

 

Values for Matrix = 
VAR Calc = 
IF(SELECTEDVALUE('Measure'[ID])=1,FORMAT([Current Hours],"#,0"),
IF(SELECTEDVALUE('Measure'[ID])=2,FORMAT([Available Hours],"#,0"),
IF(SELECTEDVALUE('Measure'[ID])=3,FORMAT([Diff (Hours)],"#,0"),
IF(SELECTEDVALUE('Measure'[ID])=4,FORMAT([Current Technician],"#0"),
IF(SELECTEDVALUE('Measure'[ID])=5,FORMAT('Available Technician'[Available Technician],"#0"),
FORMAT([Diff (Technician)],"#0"))))))
VAR Calc1 = 
sumx(VALUES('Measure'[Measure]),CALCULATE(IF(SELECTEDVALUE('Measure'[ID])=1,[Current Hours],
IF(SELECTEDVALUE('Measure'[ID])=2,[Available Hours],
IF(SELECTEDVALUE('Measure'[ID])=3,[Diff (Hours)],
IF(SELECTEDVALUE('Measure'[ID])=4,[Current Technician],
IF(SELECTEDVALUE('Measure'[ID])=5,'Available Technician'[Available Technician],
[Diff (Technician)])))))))
return
if(ISINSCOPE('Measure'[Measure]),Calc,Calc1)
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak, it doesn't work.

Do you mind to share your pbix file for the above calculations?

 

PBI_newuser_0-1613707949182.png

 

@PBI_newuser , attached after signature

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , thanks for the file.

The Total highlighted in red is still incorrect. 

E.g.

Total for Available Hours should be 1720 instead of 860.

Total for Current Technician should be 34 instead of 13.

PBI_newuser_0-1613708607040.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.