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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ttankka
Frequent Visitor

Total measure - need help

Hi All,
I am having an issue with measure totals and like many others I am not able to make it work.
I have a revenue table joined with dates.

ttankka_0-1622156230301.png

Here is a table

ttankka_1-1622156320799.png

and a matrix with current and previous period and date range 7/1/20 - 9/30/20

ttankka_3-1622156688502.png

 

ttankka_2-1622156512494.png

mRevThis = sum(Sheet1[revenue])
mRevPrev = CALCULATE(sum(Sheet1[revenuePrev]),filter(Sheet1,sum(Sheet1[revenue]) <> 0))
Only show mRevPrev if there was revenue for mRevThis and then group it all for the date range.
i.e. cust 22222 has revenue for 7/1/20 of $89 but total all revenue for previous period $844 + $153 = $997.  This is correct.
 
I get the expected value at the row level but have tried many summary measures for the total to no avail.
I will ultimately base more measures of off the total and they will end up in charts.
Help with the the total on mRevPrev will be greatly appreciated.
 
Thank you,
Tim

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Have you tried this expression?

 

NewMeasure = SUMX(VALUES(Sheet1[Customer]), [mRevPrev])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Have you tried this expression?

 

NewMeasure = SUMX(VALUES(Sheet1[Customer]), [mRevPrev])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi Pat,

Yes, it works at this level.  Thank you!  I still need to apply this measure to other calculations and I hope to get expected results.

Tim

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.