Forum Discussion

Ericshepdawg's avatar
Ericshepdawg
Frequent Visitor
3 years ago

Creating percentile on gauge graph

Hey everyone, hoping you could help me with an issue. 

I have a data set that contains energy data for 200 properties, i've created a measure called [CPS water] which calculate the water cost per suite for each property. 

I want to create a gauge graph that shows what percentile a certain property is in. When I simply enter the [CPS water] water measure it shows that properties cost, the lowest cost in the data set and the highest. Works fine. However, I run into issues when trying to use this graph for percentiles. 

Here is where i'm at so far, but I dont think it's the right approach.

current formula:

Normalized CPS Water Percentile Rank =
VAR CurrentCPSWater = [CPS Water]
VAR MaxCPSWater = MAXX(FILTER(ALL('Property names'[Property Name]), [CPS Water] <> 0), [CPS Water])
VAR MinCPSWater = MINX(FILTER(ALL('Property names'[Property Name]), [CPS Water] <> 0), [CPS Water])
VAR NormalizedRank = IF(MaxCPSWater = MinCPSWater, 0, (CurrentCPSWater - MinCPSWater) / (MaxCPSWater - MinCPSWater) * 100)
RETURN NormalizedRank
 
However, this is what comes up when I plug it into the graph. I am looking to have it on a range of 0-100. 
 
Any help is much appreciated!

1 Reply

  • Ericshepdawg Assuming guess 29.02 is the correct value, create another static measure, let's call it Maximum Value and give it the value 100, use this measure in Maximum Value well on the gauge visual and that will do it.

     

    👉 Learn Power BI Subscribe to our YT channel - @PowerBIHowTo