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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors