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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
joseama1
Regular Visitor

Create a Measure based on a dynamic slicer selection

Hello Guys!

 

let me put some backgoud first , im  putting a color rule on a bar chart base on  the following condition

Column ColorOAE = IF( AVERAGE('OAE'[C01_2M])>= [MTARGETOAE] , "#0F0", "#F00")
Column ColorOAE is the measure that i use  as function to put the color in the chart , green if is above  MTARGETOAE and red if is below.
everything works fine if i were only showing the values of  'OAE'[C01_2M] , but in my chart i have a dynamic Y axis , depending on a slicer that could select
all this options
C01_2M
C02_CLAMSHELL
C03_4M3
C05_4M1
C06_CELDA_6
C07_CELDA_7
C08_CELDA_8
C09_CELDA_9
C10_CELDA_10
C12_FUJI
C13_CANNING_1
 
how can i change this measure  to achive what i want??
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @joseama1 ,

I created some data:

vyangliumsft_0-1719885869679.png

 

Here are the steps you can follow:

1. Create measure.

Avg =
AVERAGEX(
        'Table','Table'[Value])
Color =
IF(
    [Avg]>=[MTARGETOAE],"#0F0", "#F00")

2. Column – Color –fx

vyangliumsft_1-1719885869680.png

Format style – Field value

What field should we base this on – [Color]

vyangliumsft_2-1719885909731.png

3. Result:

vyangliumsft_3-1719885909733.png

If the above results do not meet your expectations, can you express the expected results in the form of a picture, we can help you better

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @joseama1 ,

I created some data:

vyangliumsft_0-1719885869679.png

 

Here are the steps you can follow:

1. Create measure.

Avg =
AVERAGEX(
        'Table','Table'[Value])
Color =
IF(
    [Avg]>=[MTARGETOAE],"#0F0", "#F00")

2. Column – Color –fx

vyangliumsft_1-1719885869680.png

Format style – Field value

What field should we base this on – [Color]

vyangliumsft_2-1719885909731.png

3. Result:

vyangliumsft_3-1719885909733.png

If the above results do not meet your expectations, can you express the expected results in the form of a picture, we can help you better

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.