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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Trouble getting a simple grand total of a Measure

Prod_chart.png

Hello Power BI experts

I am trying to retreive the SUM of the column highlighted in red that should equate to 52.36.

It's easily done in something like Excel.

The issue I am facing is that you can only use the DAX function SUM on a real coloumn and not on a measure like Productivity. My Productivity measure is :

 

Productivity = iferror ( SUM([Quantity]) /  SUM(vSubmissionFull[AllocatedTime]) * 420 , blank() )

 

Using SUMX instead only seemed to bypass all the filters so also tried ALLSELECTED with no avail. Thanks in advance !

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

I got it myself in the end, but with your help.

 

You were close with the combination of the SUMX and VALUES function. The ALLSELECTED provided the filtered subset of vSubmissionFull that was being imposed on the matrix to get the correct result of 52.36, shown in Grey.

 

Answer is:

 

Productivity Total = CALCULATE(SUMX(VALUES(vSubmissionFull[Week Name]),[Productivity]),ALLSELECTED(vSubmissionFull))

 

Prod_chart5.png

 

 

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

@Anonymous,

Create a measure using the DAX below and drag it to Matrix visual, then check if it returns your expected result.

Measure = IF(COUNTROWS(VALUES(vSubmissionFull[DateColumn]))=1, [Productivity],SUMX(VALUES(vSubmissionFull[DateColumn]),[Productivity]))

Regards,
Lydia

Anonymous
Not applicable

Hi Lydia

 

My Prodcutivity Totay is still being split by Week Name (Text - Reason I used Text was the graph didnt auto format to months / years )

 

Productivity Total = IF(COUNTROWS(VALUES(vSubmissionFull[Week Name]))=1, [Productivity],SUMX(VALUES(vSubmissionFull[Week Name]),[Productivity]))

 

Prod_chart2.png

Anonymous
Not applicable

@Anonymous,

Create another measure using DAX below.

Measure  = CALCULATE([Productivity Total], ALL(vSubmissionFull))
1.JPG


Regards,

Anonymous
Not applicable

Hi Lynda

 

I tried what you mentioned and if it helps, ive attached the raw data used for this, if it helps !! thanks so far.

 

prod Grand Total= CALCULATE([Productivity Total], ALL(vSubmissionFull))

 

https://www.dropbox.com/s/8p4jhod7fmuvwdt/Datafile.xls?dl=0

 

Prod_chart4.png

Anonymous
Not applicable

Hi @Anonymous 

 

I got it myself in the end, but with your help.

 

You were close with the combination of the SUMX and VALUES function. The ALLSELECTED provided the filtered subset of vSubmissionFull that was being imposed on the matrix to get the correct result of 52.36, shown in Grey.

 

Answer is:

 

Productivity Total = CALCULATE(SUMX(VALUES(vSubmissionFull[Week Name]),[Productivity]),ALLSELECTED(vSubmissionFull))

 

Prod_chart5.png

 

 

You are amazing! I spent hours on this

Greg_Deckler
Community Champion
Community Champion

Check out this design pattern:

https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

 

It deals with a similar issue of summarizing and doing aggregations on measures.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I forgot to mention that I am using DirectQuery with my SSAS and Powerbi on-premis report server so I have some restrictions.

WIll check out that forum

thanks by the way

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors