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
Anonymous
Not applicable

How do I allow users to remove a measure on a graph with a checkbox or drop down?

I have this graph for my company which shows Actual, Budget and PY Actual for a certain metric. In certain areas of the business, the PY Actual is very helpful. In other areas of the business, the PY data is not accurate and causes the graphs to look wonky. In this example, you cannot really see the detail because of that March number that throws off the whole chart.

 

Is there a way to create a checkbox or drop down option for a calculated MEASURE so that if the graph looks weird, they can check a box to remove the PY Actual from the graph?

 

This is the measure for the line in the graph:

Clinical Comp/RPU-PY-ACT = calculate([Clinical Comp/RPU-ACT],DATEADD('Date'[Date],-1,YEAR))

 

graph.PNG

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

Hi @Anonymous ,

 

You can use a slicer to control the line. First create a disassociated table for slicer:

Capture1.PNG

 

Then create the following measure for line:

 

Measure = SWITCH(SELECTEDVALUE(Slicer[value]),1, calculate([Clinical Comp/RPU-ACT],DATEADD('Date'[Date],-1,YEAR)),2,BLANK(), calculate([Clinical Comp/RPU-ACT],DATEADD('Date'[Date],-1,YEAR)))

 

1.gif

 

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @v-deddai1-msft ! That worked perfectly and your explanation, screenshots, and formulas were appreciated.

v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can use a slicer to control the line. First create a disassociated table for slicer:

Capture1.PNG

 

Then create the following measure for line:

 

Measure = SWITCH(SELECTEDVALUE(Slicer[value]),1, calculate([Clinical Comp/RPU-ACT],DATEADD('Date'[Date],-1,YEAR)),2,BLANK(), calculate([Clinical Comp/RPU-ACT],DATEADD('Date'[Date],-1,YEAR)))

 

1.gif

 

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

 

Best Regards,

Dedmon Dai

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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