Forum Discussion

Faris's avatar
Faris
Regular Visitor
3 years ago

Dial Gauge changing limit

I would like to change the limit for guage dial based on the values I choose by a slicer

 

could any one help please

4 Replies

  • halfglassdarkly's avatar
    halfglassdarkly
    Icon for Responsive Resident rankResponsive Resident

    Hi Faris, you can create a measure to get the max selected value from whatever field you're using for your slicer.

     

    You'll likely want to create a disconnected table that contains the values for your slicer range, e.g. if the user is selecting from 1-100 you could create a calculated table using the GenerateSeries function https://learn.microsoft.com/en-us/dax/generateseries-function 

     

    Then use the column from this table for your slicer and create a measure like:

     

     

    Gauge Max = Max('Your Slicer Table'[Slicer Column])

     



    Then assign this as the Max value for the gauge visual.

     

    See also https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-slicer-numeric-range 

    • Faris's avatar
      Faris
      Regular Visitor

      I am using count in the current table there are no numbers. The guages are the counts of audits extracted from the table using a measure, So I am not able to set limit from the table but by the count function

  • Faris's avatar
    Faris
    Regular Visitor

    Thank you for the great solution. However, Iwould like it to be changable based on the licer I choose. As shown in the image if I picked all the hotels the dial limits will change but if I picked one of the hotels the limit will be based on the total of all hotels.

     

     

     

    Thank you

    • halfglassdarkly's avatar
      halfglassdarkly
      Icon for Responsive Resident rankResponsive Resident

      In that case the table you use for your slicer should contain a record for each hotel with the hotel name and the total value (number of audits?) for that hotel. Your Gague Max measure would just sum the total value and will dynamically update based on the inherited filter context from your slicer selection.

       

       

      Gauge Max = Sum('Your Slicer Table'[Audit Vslue])