Showing results for 
Search instead for 
Did you mean: 
Resolver I
Resolver I

Need Help | Dynamically change 'maximum' value in the GAUGE visual based on Top 5/10/25/ALL

Can we have a dynamic 'maximum value' in a gauge based on Top 5/10/25/ALL selection ?

Gauge Issuee.png

Here is the scenario

1. I have a table with the following columns.

2. I am calculating following two measures:

Shipment Count = DISTINCTCOUNT(tblImportMaster[BillLadingNo])
Sum of Weight = SUM(tblImportMaster[Weightkg])

Using these two measures I am calculating a third measure as follows:

Volume = [Shipment Count] * [Sum of Weight]

3. In this step, I am calculating RANK by Sellers w.r.t Volume

SellerRankByMeasure = RANKX(ALL(tblImportMaster[Shipper]),[Volume],,DESC)

4. Now, I have a slicer for Top 5/10/25/ALL. Using this custom slicer that is created, we are filtering the records by the following measure:

SellerRankVolume = IF([SellerRankByMeasure]<=[SelectedTopNValue],[Volume])


So if I plot the following visual in a table, it works fine. However if I want to change this volume dynamically based on the Top 5/10/25/ALL
slicer, it does not reflect the 'sliced' value in the GAUGE.

Can we have a value in the gauge (in the maximum section) to be filtered dynamically ?

Any help here would be appreciated. Thank you Smiley Happy

Solution Sage
Solution Sage

Re: Need Help | Dynamically change 'maximum' value in the GAUGE visual based on Top 5/10/25/ALL



do you know where the 2470 comes from?

What would be the expected result?

Does value change if you change your slicer?


Best regards.

Community Support
Community Support

Re: Need Help | Dynamically change 'maximum' value in the GAUGE visual based on Top 5/10/25/ALL

Hi ketan10,


TopN is a calculate column and SelectedTopNValue is a measure, right?


If you are using single selection, you can refer to this pattern:

[SelectedTopNValue] =

 If you are using multiple selection, you can refer to this pattern:

[SelectedTopNValue] =
CALCULATE ( SUM ( Table[TopN] ), ALLSELECTED ( Table[TopN] ) )

Hope it's helpful.



Jimmy Tao

Helpful resources

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.



Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors