Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Gauge chart - doubles data in total

Hi All

I need to create a KPI dashboard where I calculate two KPI's (power BI file and Excel attached):

1) % of "Done" workshops per division

2) % of "Done" reviews per division

 

I have two questions:

1) When I create the Gauge chart, it always just doubles the number of entries it found in the total, instead of counting the total number of entries. How do I fix that? Example: if I select only "Workshop" and status only "Done", it should show 8 records from 72 records. But it shows 8 records from 16 records.

2) How do I change it to percentage? If I cnahge to "percent of grand total", it always shows me 100%.

 

 

 

Files are here:

https://drive.google.com/drive/folders/1FzUurRAjTORWHFv-WM5pPx9pZqBzx8nm?usp=sharing

 

Thanks for you help!

Natalia

 

9 Replies

  • Anonymous see attached hope it helps. you have to create a measure to assign the target and also added a card visual for %

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot! Worked like a charm!

    • Anonymous's avatar
      Anonymous
      Not applicable

      parry2k 

      I was too qiuck! It's working fine, but the problem now is that if I click on one Division, I want the target to also show per Division. I.e. for Div1, it should be 4 out of 18 instead of 4 out of total 72. And for two divisions, it should be "Nr of "Done" from 18x2, etc

      Is it possible?

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        Anonymous change you target measure to

         

        Target = 
        CALCULATE( 
        COUNTROWS( Table13 ), 
        ALLEXCEPT( Table13, Table13[Divusion] ) 
        )

         

         

  • kentyler's avatar
    kentyler
    Icon for Solution Sage rankSolution Sage

    That one was fun.

    I was able to get a donut chart to respond correctly, but not the guage
    To create the chart I had to write 3 measures:
    Num Rows = countrows(all(Table13))
    this gives me an overall row count, regardless of what the slicers have been set to.
    Rows Selected = countrows(Table13)
    this gives me a count of the number of rows selected by setting values in the 2 slicers
    Percent selected = Divide([Rows Selected],[Num Rows]) * 100
    this divides those 2 numbers to give me the percent selected
    The issue here, i think, is that the 2 slicers filter EVERYTHING, unless you use measures to get things like the total count, because in the measures you can do things like use ALL(), which removes the filters put on by the slicers.
    I cannot get the guage to respond in a reasonable way to these numbers, even when they are correct, but a donut chart works just fine.
    I will load your sample back to google drive, with my initials added to the name.