Forum Discussion

anshenterprice's avatar
2 years ago
Solved

Need to create a static chart with dynamic numbers

Hi Team,

recently we have used Linear Guage chart in our dashboard

ScriptValueDate
Equity41/30/2024
Commodity31/30/2024
currency51/30/2024
Equity31/29/2024
Commodity11/29/2024
currency41/29/2024


we need to create a three bands based on the date filter and the above values from 1to 5 always
basically we need to create 5 colured texboxes like below 



Thanks



  • Hi anshenterprice ,

     

    Are you using the following visualization?

    If so, based on the sample and description you provided, please try the following steps:

    1.Use the following code to create Measure.

    Equity_Value = CALCULATE(SUM('Table'[Value]),
                             FILTER('Table','Table'[Script] = "Equity" && 'Table'[Date] = MAX('Table'[Date]))
                            )
    Commodity_Value = CALCULATE(SUM('Table'[Value]),
                                FILTER('Table','Table'[Script] = "Commodity" && 'Table'[Date] = MAX('Table'[Date]))
                               )
    currency_Value = CALCULATE(SUM('Table'[Value]),
                               FILTER('Table','Table'[Script] = "currency" && 'Table'[Date] = MAX('Table'[Date]))
                              )

    2.Put the measure value into your Visualization and do the following.

    3.Set the maximum value to 5 in the Visualization panel.

    When you select "1/29/2024" in the slicer, Result is as below.

     

    Best Regards,
    Yulia Yan

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

2 Replies

  • v-weiyan1-msft's avatar
    v-weiyan1-msft
    Icon for Community Support rankCommunity Support

    Hi anshenterprice ,

     

    Are you using the following visualization?

    If so, based on the sample and description you provided, please try the following steps:

    1.Use the following code to create Measure.

    Equity_Value = CALCULATE(SUM('Table'[Value]),
                             FILTER('Table','Table'[Script] = "Equity" && 'Table'[Date] = MAX('Table'[Date]))
                            )
    Commodity_Value = CALCULATE(SUM('Table'[Value]),
                                FILTER('Table','Table'[Script] = "Commodity" && 'Table'[Date] = MAX('Table'[Date]))
                               )
    currency_Value = CALCULATE(SUM('Table'[Value]),
                               FILTER('Table','Table'[Script] = "currency" && 'Table'[Date] = MAX('Table'[Date]))
                              )

    2.Put the measure value into your Visualization and do the following.

    3.Set the maximum value to 5 in the Visualization panel.

    When you select "1/29/2024" in the slicer, Result is as below.

     

    Best Regards,
    Yulia Yan

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