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
jhauw74
Helper I
Helper I

Conditional formatting of line graph using measures

Hi experts - is there a way I can control the line graph colour change using the drop down menu? Or is there a way to combine this in a single measure? I want to remove or hide 1 measure from the line graph so when the option in the drop down selected that graph representing 1 measure will be hidden.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jhauw74 ,

You can create field parameter for your drop down menu and then switch the measure based on the option, which may look as follows:

vtianyichmsft_1-1734054916569.png

 

vtianyichmsft_0-1734054864617.png

 

OptionMeasure = 
SWITCH(
    [Parameter],
    "ID", [IDMeasure],
    "Value", [ValueMeasure],
    BLANK()
)


 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Hi @jhauw74 ,

You can create field parameter for your drop down menu and then switch the measure based on the option, which may look as follows:

vtianyichmsft_1-1734054916569.png

 

vtianyichmsft_0-1734054864617.png

 

OptionMeasure = 
SWITCH(
    [Parameter],
    "ID", [IDMeasure],
    "Value", [ValueMeasure],
    BLANK()
)


 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Hi Scott - this is sounds what I am looking for - are you able to  give me step by step as to where I can get the field parameter?

 

Josh.

Anonymous
Not applicable

Hi @jhauw74 ,

It is in the power bi modeling tab, click New parameter:

vtianyichmsft_0-1734067066525.png


Best regards,
Community Support Team_ Scott Chang

 



ryan_mayu
Super User
Super User

@jhauw74 

 

you can try to create two buttons and use page navigator to switch between two similar pages.

 

https://learn.microsoft.com/en-us/power-bi/create-reports/button-navigators?tabs=powerbi-desktop?wt....

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.