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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ianboothman84
Helper II
Helper II

Correct total of a Measure

Good Afternoon All 

 

I am looking to create a measure to add my columns together, but am struggling 😞

i have created a measure to calcualte agent bonus, as you can see from below this is in a matrix table seperated by a Week commecing date. (therefore te one measure)

 

I would like to add a 'Total' column at the end adding up the values. Can this be done? 

ianboothman84_0-1630588382326.png

 

1 ACCEPTED SOLUTION

Hi @ianboothman84 ,

 

The following should work for you, reference your base measure inside a SUMX

CA BONUS SUMX = SUMX(KEEPFILTERS(VALUES('U&R'[Week Num])), [CA Bonus])

 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


View solution in original post

9 REPLIES 9
v-luwang-msft
Community Support
Community Support

Hi @ianboothman84 ,

I think it need to create a new measure and use if (hasonevalue,A,sumx(table,beforemeasure).

Could you pls share your  pbix file ,need to test it .

 

 

Best Regards

Lucien

Hello 

 

I hope i have done this righ 🙂

 

https://ufile.io/fyqu18u8

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture - maybe insert into a table?) and show the expected outcome.

lbendlin
Super User
Super User

You have probably used SELECTEDVALUE() in your measure.  That's not a thing in the totals. Rewrite your measure.

Hi @lbendlin , thank you for your reply. my measure is a simple on 

 

CA Bonus = CALCULATE(SUM('U&R'[CompassAcceptedFormatted])*[Conversion Bonus])

In the settings of your matrix visual enable Column subtotals

 

lbendlin_0-1630930828720.png

 

hello @lbendlin 

 

i did this but the values were not correct 

ianboothman84_0-1630932172779.png

 

Hi @ianboothman84 ,

 

The following should work for you, reference your base measure inside a SUMX

CA BONUS SUMX = SUMX(KEEPFILTERS(VALUES('U&R'[Week Num])), [CA Bonus])

 



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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