cancel
Showing results for
Search instead for
Did you mean:
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 ?

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

2 REPLIES 2
Solution Sage

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

Hello,

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

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

Hi

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

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

`[SelectedTopNValue] =SELECTEDVALUE ( Table[TopN] )`

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

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

Hope it's helpful.

Regards,

Jimmy Tao

## Helpful resources

Announcements

#### ‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors