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.
Hello,
I want to create a measure that divide the sales of a category by the total sales of the same month to represent later the % of sales for each category and month in a chart, but I'm unable to find one measure that works properly. I have attached an image with the desired output in Excel.
Thank you
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
% measure: =
VAR _value =
SUM ( data[value] )
VAR _allcategory =
CALCULATE ( SUM ( data[value] ), ALL ( category[category] ) )
RETURN
DIVIDE ( _value, _allcategory )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
% measure: =
VAR _value =
SUM ( data[value] )
VAR _allcategory =
CALCULATE ( SUM ( data[value] ), ALL ( category[category] ) )
RETURN
DIVIDE ( _value, _allcategory )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
That's exactly what I needed. You've saved my life.
Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
71 | |
49 | |
45 | |
20 | |
17 |