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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
accds
New Member

Need help on sum a measure and get percentage

I use the following measure to get my volume2019YTD:

Volume2019YTD = CALCULATE(sum(table[Volume]),DATESYTD(table[SalesDate]))
But when I try to get the percentage of total VolumeYTD for each Brand, I failed.

The only thing I can get is

BrandVolume2019YTDTotalVolume(last 3 years)Wrong Percentage
A100030001000/3000=33%
B7002000700/2000=35%
C8002500800/2500=32%
Total2500  

 

 

But I actually want to get this:

BrandVolume2019YTDHow can I get this?
A10001000/2500 = 40%
B700700/2500 = 28%
C800800/2500 = 32%
Total2500 

Can someone help me with it? Thank you!!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=[Volume2019YTD]/CALCULATE([Volume2019YTD],ALL(table[Brand]))

Express this as a %.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=[Volume2019YTD]/CALCULATE([Volume2019YTD],ALL(table[Brand]))

Express this as a %.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.