Forum Discussion
Display Percent rather than Count
- 9 years ago
Hi enterprised1,
We should write measure to show the correct percentage. Please follow the steps below to see if it would work:
- Under the data View, create a measure to calculate the count of Amount=800;
- Count800 = calculate(count(‘Table’[ID]), ‘Table’[Amount]=800)
- Create another measure to calculate the percentage:
- Precent = Divide([Count800],COUNT(‘Table’[ID]))
- Under the report View, in the Fields, click Precent, then click on % to format it. Select Card Visual and put the Precent into the values, it should show the correct percentage:
Using the quick calc here would always show 100%, as the total count is also filtered, but not the original total.
If any further help needed, please feel free to post back.
Regards
Hi enterprised1,
We should write measure to show the correct percentage. Please follow the steps below to see if it would work:
- Under the data View, create a measure to calculate the count of Amount=800;
- Count800 = calculate(count(‘Table’[ID]), ‘Table’[Amount]=800)
- Create another measure to calculate the percentage:
- Precent = Divide([Count800],COUNT(‘Table’[ID]))
- Under the report View, in the Fields, click Precent, then click on % to format it. Select Card Visual and put the Precent into the values, it should show the correct percentage:
Using the quick calc here would always show 100%, as the total count is also filtered, but not the original total.
If any further help needed, please feel free to post back.
Regards
v-micsh-msft Thanks for the suggestion! I'm not using Power BI Desktop, but I believe I can accomplish adding the Measure directly in the Excel file. I'll give that a try and will post back if I run into any issues.
Any ideas on if or how this can be accomplished within the Power BI service? I would rather be able to do it from the Power BI interface than go messing with the Excel file if I can avoid it.
Thanks!
- v-micsh-msft9 years agoMicrosoft Employee
Hi
Apologize to say that currently it is not available to create calculated column or a measure in Power BI Service.
You may take a try with Power Bi desktop, download it from here:
https://powerbi.microsoft.com/en-us/desktop/
Regards
- enterprised19 years agoHelper I
Hi Michael,
I thought that would be the case. I didn't see any way of adding measures from the Power BI service.
However, I was able to add the measures within the data model of the Excel file using the steps you provided, so all's good. Thanks for your help!