Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
v_pbrase
New Member

Filter a Gauge Maximum Value?

I have a gauge that tracks firm expenses with the maximum value being the total budgeted amount for the year. The progress numbers are the "year-to-date" values. The user can filter the report for a specific firm office. When the filter is set, the progress values correctly update to show only the data for the specific office. However, the max value remains the firm total, in other words, the filter is not applied to the max value. The expense data is stored in a table and I calculate the max value by summing the relevant column. Is there a way I can get the filter enforced on that as well?  Thank you!

5 REPLIES 5
negi007
Community Champion
Community Champion

@v_pbrase in this case, you can create a measure that will be give you max values basis your selection.

 

let's say you have a data where you have product category and for each category you wish to have different max value. so you create a measure like below

 

Max_value =
var _sel = SELECTEDVALUE(Orders[Product Category])
return
if (_sel="Furniture",200,
if(_sel="technology",500))
 
you can then use this measure to set max value basis selection

negi007_0-1654612738639.png

 

 max value changes when you select catgory 1

negi007_1-1654612769387.png

  max value changes when you select catgory 2

negi007_2-1654612782262.png
hope this can take you in the right direction.



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

But you're hard coding the maximum value. I need to filter the table prioviding the maximum value by the selected filter. The progress values get filtered correctly but the max value is not filtered. All values come from

measures. The filter is set for the gauge - if I open the filter view on the gauge, I can see that it has the correct filter value, but it is not being applied to the max value. 

negi007
Community Champion
Community Champion

@v_pbrase instead of hard coded value, you can write dax code to get the max value




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

negi007
Community Champion
Community Champion

@v_pbrase you can write your dax code similar to below

 

Max_value =
var _sel = SELECTEDVALUE(Orders[Product Category])
var _max_fur = CALCULATE(MAX(Orders[Profit]),Orders[Product Category]="Furniture")
var _max_tec = CALCULATE(MAX(Orders[Profit]),Orders[Product Category]="technology")
return
if (_sel="Furniture",_max_fur,
if(_sel="technology",_max_tec))

 



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

amitchandak
Super User
Super User

@v_pbrase , You can use a measure for maximum value to make it dynamic

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.