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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

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 

anshenterprice_0-1706603680248.png



Thanks



1 ACCEPTED SOLUTION
v-weiyan1-msft
Community Support
Community Support

Hi @anshenterprice ,

 

Are you using the following visualization?

vweiyan1msft_0-1706679316029.png

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.

vweiyan1msft_1-1706679529120.png

vweiyan1msft_2-1706679538023.png

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

vweiyan1msft_3-1706679569446.png

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

vweiyan1msft_4-1706679587883.png

 

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.

View solution in original post

2 REPLIES 2
v-weiyan1-msft
Community Support
Community Support

Hi @anshenterprice ,

 

Are you using the following visualization?

vweiyan1msft_0-1706679316029.png

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.

vweiyan1msft_1-1706679529120.png

vweiyan1msft_2-1706679538023.png

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

vweiyan1msft_3-1706679569446.png

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

vweiyan1msft_4-1706679587883.png

 

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.

Ritaf1983
Super User
Super User

Hi @anshenterprice 
It seems a classic scenario for a bullet chart.

Please refer :

https://www.youtube.com/watch?v=QcHeq5nJUTc

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.