Forum Discussion

ppgandhi11's avatar
ppgandhi11
Helper V
8 years ago

grouping question

Hi,

 

I am very new to PowerBI and trying to achieve below.

 

I have below output.

 

Plan  Color

ABC  RED

DEF  GREEN

GHI  GREEN

JKL   GREEN

MNO RED

 

I want below output from the above.

 

Color  Count

RED       2

GREEN  3

 

How to achive this? There are 2 rows with RED and 3 rows with GREEN, I want to aggregate them.

 

The Plan column came from the SQL Server DB query.  The color is a measure that came from calculated fields. (the logic for that is: if the plan had >= 90% success color is GREEN, otherwise RED).

 

Any help is much appreciated. Thanks.

5 Replies

  •  

     

    This is how it looks as of now. In a separate table visualization as soon as I drop colorcode, the only color it displays is GREEN because overall result is GREEN. This is happening because the GREEN/RED for individual plan is determined based on the calculation for that plan.

     

    Desired output for above is:

     

    Colorcode  Count

    RED                2

    GREEN           7

     

    Thanks.

    • RMDNA's avatar
      RMDNA
      Solution Sage

      ppgandhi11,

       

      In the visual settings, turn off "Total", and set Health Plan to "Count" rather than "Don't Summarize"

       

       

       

       

       

      • ppgandhi11's avatar
        ppgandhi11
        Helper V

        where is the "Total" that I need to turn off? I did not get that part.

         

        Also, I already tried doing count on Health Plan the way you showed me. That would not work I think because I am getting 1000s of records from the database. every record has a associated health plan.

         

        The logic is: if the 90% of claims are paid within 15 days, then the associated health plan should turn Green, otherwise Red. I got upto the point I demonstrated where I am putting every plan in either green or red by using various measures.

         

        Now I need to display how many plans are red and how many are green. that is where I am stuck.

         

        If I put count on health plan, then the aggregation is putting the numbers in 10000s for green and red is missing because overall total claims and processed claims are above 90% for all the healthplans collectively.

    • ppgandhi11's avatar
      ppgandhi11
      Helper V

      if the color is a calculated column then it works fine. I just tested it. My problem is: color is a measure that is being derived from the calculations.