Forum Discussion

emma313823's avatar
emma313823
Helper V
2 years ago
Solved

Modifying gauge visual

All,

 

I'm wondering if there is a way to accomplish this in a gauge visual. I'm using the following measure for a gauge visual and have 8  - each filtered to a specific cutomer we are monitoring.

 

CumulativeActual = CALCULATE( SUM('Forecast-v-Actual'[Actual]), FILTER( 'Forecast-v-Actual', MONTH('Forecast-v-Actual'[Date]) <= MONTH(TODAY()) && YEAR('Forecast-v-Actual'[Date]) = YEAR(TODAY()) ) )
 

In the screenshot below I have one visual.

 

My measure is allowing me to focus on the current year and I believe to dynamically update as the year progresses. 

 

Min value (left side) - my starting point at the beginning of every year is zero. 

The max value (right side) is my forecasted value. 

Center or value is my actual value.

The red line or target is also actual value.

 

I would like VALUE (center number) to show as a percent to forecast value.

 

So $442,164 / 1,005,000 = 44% to forecast.

 

Is there a way do this or a way to modify the measure to do this?

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi emma313823 

     

    Sorry for not ending clearly.

    I corrected Measure for you:

     

    Prcnt-to-Frcst =
    VAR SumActual =
        CALCULATE ( SUM ( 'Forecast-v-Actual'[Actual] ) )
    VAR SumForecast =
        CALCULATE ( SUM ( 'Forecast-v-Actual'[Forecast] ) )
    RETURN
        FORMAT ( DIVIDE ( SumActual, SumForecast, 0 ), "Percent" )
    

     

     Then you can put the Prcnt-to-Frcst measure in the Callout value box, just as the Percentage measure in my side.

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi emma313823 

     

    Please try this:
    Here I create a set of sample:

    Then add a Gauge visual:

    You can open the Custom label in the Callout value pane and select the percentage to the box:

    Here is the result:

     

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi

     

    I'm a little confused on your example. Trying to mirror based on my numbers and it is not working at all.

     

    I have the following for my forcast and actual numbers numbers:

     

    DateForecastActual
    1/31/2024$80,000$69,453
    2/29/2024$80,000$88,192
    3/31/2024$80,000$79,290
    4/30/2024$80,000$43,416
    5/31/2024$80,000$86,123
    6/30/2024$80,000$75,690
    7/31/2024$85,000$55,725
    8/31/2024$85,000 
    9/30/2024$85,000 
    10/31/2024$90,000 
    11/30/2024$90,000 
    12/31/2024$90,000 

     

    You have a 'percentage' measure in one of your screenshots, so not sure where that is coming from.

     

    In the screenshot below I want to use the following items in the visual. And the visual is showing what I want where I want, however the 498K needs to be a percent.

     

     

    If I select the 'value' on the visualization (the center number which is CumulativeActual - my measure) and select show value as 'percent of grand total'...it changes it to look like this. 

     

     

    Should a measure be created to capture the cumulativeActual / forecast?

     

    I struggle with how to do this, but came up with this...

     

    Prcnt-to-Frcst =
    var SumActual = CALCULATE(SUM('Forecast-v-Actual'[Actual]))
    var SumForecast = CALCULATE(SUM('Forecast-v-Actual'[Forecast])
    Format(
        Divide (SumActual;SumForecast;0)
        ),
    "Percent"))
     
    however, I get an error.
     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi emma313823 

       

      Sorry for not ending clearly.

      I corrected Measure for you:

       

      Prcnt-to-Frcst =
      VAR SumActual =
          CALCULATE ( SUM ( 'Forecast-v-Actual'[Actual] ) )
      VAR SumForecast =
          CALCULATE ( SUM ( 'Forecast-v-Actual'[Forecast] ) )
      RETURN
          FORMAT ( DIVIDE ( SumActual, SumForecast, 0 ), "Percent" )
      

       

       Then you can put the Prcnt-to-Frcst measure in the Callout value box, just as the Percentage measure in my side.

       

      Best Regards

      Zhengdong Xu
      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

       

      • emma313823's avatar
        emma313823
        Helper V

        Hi

        This is not working either. I get the following: