Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 )
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 )
That's exactly what I needed. You've saved my life.
Thank you!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |