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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Stymied9
Frequent Visitor

Gauges question

Since the default Power BI gauge does not allow you to change the fill color based on the target value being met or not, I have a question about the DialGauge and Tachometer.

 

Background:

I am measuring on time performance, ie: did the carrier deliver our product on time  The file I am working on has roughly 60,000 rows and 100 columns.  Within those 100 or so columns, I am using a number of them to ultimately get me to my final column, a numeric reference, 0 = on time, 1 = late, 2 = everything else that is not applicable.  I then created a measure 1- SUM of my numeric refernce column / COUNTA of my numeric reference column.

On the default gauge, I use that measure to get my on time percentage.  I can also assign different target values, 97% (.97) for Air and 90% (.90) for Ocean shipments.  So if I filter via a separate slicer, the gauge will change it's target and also change the actual on time percentage.

 

Question #1: Can either the Dial Gauge or Tachometer have separate targets set up and have those targets change based on a filtered slicer?  So if I have nothing or both options in the slicer chosen, it would provide an average, in this case 94% and it would include all Air and Ocean shipments.  Alternatively, if I chose only Air or Ocean, the target value would change from the 94% average to 97% or 90% respectively, also including only the applicable Air or Ocean shipments?

 

Question #2: 

Do I need to create an entirely different table to assign specific values for everything.  For example:

Mode       Min          Max          Target         

Air            0              100            97

Ocean      0              100            90

 

or would that even work?  Because I would think I need a connection between the two sheets (Air / Ocean), and the transport mode seems to be the clearest option.

 

Thanks in advance for your assistance.

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

@Stymied9,

 

You may refer to the following measure.

Measure =
VAR m =
    SELECTEDVALUE ( Table2[Mode] )
RETURN
    SWITCH ( m, "Air", 97, "Ocean", 90, 94 )
Community Support Team _ Sam Zha
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

4 REPLIES 4
Anonymous
Not applicable

To create a Gauge that dynamically changes colour based on the current value, use conditional formatting. You can change the Field that the colours are based under "What field Should we base this on?"

biancagilly_0-1661490607814.png

 

To learn how create a conditional formatted gauge, check out the YouTube demo: https://youtu.be/oEL36Fp3TU0.

v-chuncz-msft
Community Support
Community Support

@Stymied9,

 

You may refer to the following measure.

Measure =
VAR m =
    SELECTEDVALUE ( Table2[Mode] )
RETURN
    SWITCH ( m, "Air", 97, "Ocean", 90, 94 )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I don't get the Var.m option.  I have Var.p, Var.s, Varx.p, and Varx.s.  Any suggestions?

@Stymied9,

 

This is just a variable.

https://www.sqlbi.com/articles/variables-in-dax/

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors