Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm hoping the community can help me out here. Searchese have proved fruitless so far.
The business has requested that we show total hours by project and also show the percentage of hours each project represents compared to the whole. However, when a slicer is applied, the total number of hours used for the denominator doesn't seem to change. Here is an example.
Here is the data structure.
What we are trying to figure out is how to get the denominator in this equation to be dynamic as slicers are applied so that the data that shows on the screen in the first screenshot displays the correct percentage.
Any assistance that can be provided is greatly appreciated!
Patrick
Solved! Go to Solution.
Hi @pAAmckelvey,
Based on my test, you can refer to below steps:
1.I have entered some sample data to test for your problem in below picture.
2.Create a new measure to calculate the percentage.
percentage = DIVIDE(SUM(Sheet2[Hours]),CALCULATE(SUM(Sheet2[Hours]),ALLSELECTED(Sheet2[Work Description])))
3.Create a Table visual and add the [Work Description] and the [Hours] field. Create a Slicer visual to add the [percentage] field. And now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi @pAAmckelvey,
Based on my test, you can refer to below steps:
1.I have entered some sample data to test for your problem in below picture.
2.Create a new measure to calculate the percentage.
percentage = DIVIDE(SUM(Sheet2[Hours]),CALCULATE(SUM(Sheet2[Hours]),ALLSELECTED(Sheet2[Work Description])))
3.Create a Table visual and add the [Work Description] and the [Hours] field. Create a Slicer visual to add the [percentage] field. And now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
User | Count |
---|---|
84 | |
78 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |