Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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

  • 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

     

    • Anonymous's avatar
      Anonymous
      Not 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's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Anonymous ,

     

    why are you using a measure for "Success/Fail" and not a calculated column?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello - I was using a measure due to limitations with direct query.