Forum Discussion
Create Pie Chart based off of Measure
Hello, new to Power BI here.
My goal for this pie chart is to display number of Successes and number of Failures.
Currently, I have the following information:
The 'columns' CRQ Success and Success/Fail are actually measures.
Success/Fail is based off of the CRQ Success Column.
I would like to have a pie chart based off the Success/Fail column which either contains the value of SUCCESS or FAIL.
Each ChangeID will have a Success/Fail status.
The issue is I do not know where to place my values to make a pie chart. The Success/Fail measure only goes into the tooltips section of the visualization, so I do not know how to display successes and failures.
HI Anonymous ,
What you can do to achieve this is, create 2 measures - One for count of SUCCESS and one for count of FAILURE.
then move the above two measures in the VALUES section of the pie-chart.
Can you share the calculation for your SUCCESS/FAIL measure?
Thanks,
Pragati
5 Replies
- Pragati11
Super User
HI Anonymous ,
What you can do to achieve this is, create 2 measures - One for count of SUCCESS and one for count of FAILURE.
then move the above two measures in the VALUES section of the pie-chart.
Can you share the calculation for your SUCCESS/FAIL measure?
Thanks,
Pragati
- AnonymousNot applicable
Yes - here is the calculation for the Success/Fail measure
Success/Fail = IF( CONTAINSSTRING('Table'[CRQ Success],"Canceled"),"FAIL", IF( CONTAINSSTRING('Table'[CRQ Success],"Failed*"), "FAIL", "SUCCESS"))Just in case for clarification, CRQ Success is a measure as well.
- mwegener
Most Valuable Professional
Hi Anonymous ,
I'm not sure, but maybe you can use that to group.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning
- mwegener
Most Valuable Professional
Hi Anonymous ,
why are you using a measure for "Success/Fail" and not a calculated column?
- AnonymousNot applicable
Hello - I was using a measure due to limitations with direct query.