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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors