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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mathec01
Frequent Visitor

How to filter a chart by measure

I have a list of data and calculate KPIs values. The KPIs have different way of calculations, so I have a measure that SWITCH to other measures depending on what kind of calculations that KPI need.

 

I have one measure that SWITCH for Month values, and another one for Year-to-date values.

 

I wanna create a filter so I can have 1 chart and can choose if I'm seeing Month values or year-to-date values.

 

Right now I have to drop one of them in Value, so I can see only Month or only year-to-date in a chart.

 

Is it possible to have only one chart and filter which measure I want as value? 

 

Thanks!

 

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @mathec01,


Is it possible to have only one chart and filter which measure I want as value? 


Yes, it is.

 

1. Add a new table with a column called "Measure to Show" which contains the measure names you want to show on the chart.

 

t1.PNG

 

2. Create a new measure to switch measures according to the selection on the Slicer of "Measure to Show" column.

Measure = IF ( FIRSTNONBLANK ( Table1[Measure to Show], 1 ) = "m1", [m1], [m2] )

3. Then you should be able to show the new created measure as Values on your chart, and the "Measure to Show" column as Slicer to get your expected result. Smiley Happy

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @mathec01,


Is it possible to have only one chart and filter which measure I want as value? 


Yes, it is.

 

1. Add a new table with a column called "Measure to Show" which contains the measure names you want to show on the chart.

 

t1.PNG

 

2. Create a new measure to switch measures according to the selection on the Slicer of "Measure to Show" column.

Measure = IF ( FIRSTNONBLANK ( Table1[Measure to Show], 1 ) = "m1", [m1], [m2] )

3. Then you should be able to show the new created measure as Values on your chart, and the "Measure to Show" column as Slicer to get your expected result. Smiley Happy

 

Regards

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.