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.
This might be a simple fix, im not sure.
I have a simple table (shown below). Essentially what i want is a stacked bar chart show progress to the total.
Label Tasks Needed Tasks Completed
Name 10 5
When i create the bar chart, the %'s are using a total of 15 instead of 10. So it would show 30% instead of 50%, when comparing completed tasks to total.
Any advice? (P.S. I know this can be achieved in a bullet chart but IMO this is more visually appealing for me audience.)
Solved! Go to Solution.
Hi @thampton
Workaround:
I make a copy of "Sheet6" as "Sheet7", in "Sheet7", select "Tasks Needed" and "Tasks Completed" columns, then "Unpivot columns",
Close &&Apply, create a measure in "Sheet7",
Measure = VAR percentage = CALCULATE ( SUM ( Sheet7[Value] ), FILTER ( ALL ( Sheet7 ), Sheet7[Label ] = MAX ( Sheet7[Label ] ) && Sheet7[Attribute] = "Tasks Completed" ) ) / CALCULATE ( SUM ( Sheet7[Value] ), FILTER ( ALL ( Sheet7 ), Sheet7[Label ] = MAX ( Sheet7[Label ] ) && Sheet7[Attribute] = "Tasks Needed" ) ) RETURN IF ( MAX ( Sheet7[Attribute] ) = "Tasks Completed", percentage, 1 - percentage )
Select data format for this measure as "percentage",
Add columns and measures from Sheet7 in the "Stacked bar chart" as below
Best Regards
Maggie
Hi @thampton
Workaround:
I make a copy of "Sheet6" as "Sheet7", in "Sheet7", select "Tasks Needed" and "Tasks Completed" columns, then "Unpivot columns",
Close &&Apply, create a measure in "Sheet7",
Measure = VAR percentage = CALCULATE ( SUM ( Sheet7[Value] ), FILTER ( ALL ( Sheet7 ), Sheet7[Label ] = MAX ( Sheet7[Label ] ) && Sheet7[Attribute] = "Tasks Completed" ) ) / CALCULATE ( SUM ( Sheet7[Value] ), FILTER ( ALL ( Sheet7 ), Sheet7[Label ] = MAX ( Sheet7[Label ] ) && Sheet7[Attribute] = "Tasks Needed" ) ) RETURN IF ( MAX ( Sheet7[Attribute] ) = "Tasks Completed", percentage, 1 - percentage )
Select data format for this measure as "percentage",
Add columns and measures from Sheet7 in the "Stacked bar chart" as below
Best Regards
Maggie
This is awesome! Thanks
Hi,
Try this measure
Progress (%) =SUM(Data[Tasks Completed])/SUM(Data[Tasks Needed])
Hope this helps.
Given the information provided, I'm not following why you are getting a 15 instead of 10. You can display a % of total by clicking the little drop down next to the column or measure in the fields area under VISUALIZATIONS and choose Show Value As | Percentage of Grand Total
Here is a better example. I am using the 100% stacked column chart (sorry i misspoke in title).
I have two values: one value is the "needed" at 784, one value is the "completed" at 64.
The data label inside the "completed" is 7.55% which is wrong. It is using (784+64) as the total instead of using 64/784 = 8.2%.
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 |
---|---|
80 | |
79 | |
59 | |
36 | |
35 |
User | Count |
---|---|
99 | |
57 | |
56 | |
46 | |
40 |