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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Xilitor01
Helper III
Helper III

Two measures filtered by different slicers

Hello,

 

I want to make a benchmark page where I can filter the same measure on different slicers.

I have the example like below where I want the slicers on the left to filter the blue measure and filters on the right to filter the green measure.

Any ideas to how that's possible to make? The filters comes from different tables.

Xilitor01_0-1653319774539.png

 

1 ACCEPTED SOLUTION
SergioSilvaPT
Resolver V
Resolver V

You can create a copy of your table and create a duplicate measure for that new table, and you will be able to filter based on the new data independently, but the x-axis for the date will always be one only.

 

To create a copy of your table go to Modeling and select New table, the write NameOfNewTable = NameOfOldTable.

 

The slicer on the left has the product name from the NameOfNewTable, and the slicer on the right has the product name from NameOfOldTable.

 

SergioSilvaPT_0-1653320986280.png

 

 

For the Date you have to do this:

Create 2 copies of your calendar table, one for one metric, and another for the other metric. Connect them according to this image:

 

SergioSilvaPT_0-1653322183883.png

 

The you to change the measures to exclude the filtering from the Calendar:

 

 

new sales = CALCULATE(
    SUM('Copy Sales'[Total Amount]),
    ALL('Calendar'[Month (Year)])
)

 

 

And use the Calendar in your visual, for example i used Month (Year) in the line chart and i used ALL(Calendar[Month (Year)]) in the measure to consider all values. You have to do this in both measures that you have in the line chart.

 

This will solve your problem! 🙂 

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

View solution in original post

6 REPLIES 6
SergioSilvaPT
Resolver V
Resolver V

You can create a copy of your table and create a duplicate measure for that new table, and you will be able to filter based on the new data independently, but the x-axis for the date will always be one only.

 

To create a copy of your table go to Modeling and select New table, the write NameOfNewTable = NameOfOldTable.

 

The slicer on the left has the product name from the NameOfNewTable, and the slicer on the right has the product name from NameOfOldTable.

 

SergioSilvaPT_0-1653320986280.png

 

 

For the Date you have to do this:

Create 2 copies of your calendar table, one for one metric, and another for the other metric. Connect them according to this image:

 

SergioSilvaPT_0-1653322183883.png

 

The you to change the measures to exclude the filtering from the Calendar:

 

 

new sales = CALCULATE(
    SUM('Copy Sales'[Total Amount]),
    ALL('Calendar'[Month (Year)])
)

 

 

And use the Calendar in your visual, for example i used Month (Year) in the line chart and i used ALL(Calendar[Month (Year)]) in the measure to consider all values. You have to do this in both measures that you have in the line chart.

 

This will solve your problem! 🙂 

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

@Xilitor01 did my solution solve the problem?

Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/
SergioSilvaPT
Resolver V
Resolver V

Hi @Xilitor01 ,

 

Select one slicer and go to Format and Edit Interactions, then you will notice that above every visual appears some symbols you only need to chose the circle to not filter that visual.

 

SergioSilvaPT_0-1653320023964.png

 

SergioSilvaPT_1-1653320165136.png

 

Then select the other slicer and do the same for the other visuals.


In the end select Edit Interactions again. You're done!

 

Regards,

Sérgio Silva 

 
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

I think you misunderstand the problem.

The slicers on the left should only affect the blue measure and the slicers on the right should only affect the green measure.

What you explain is how the slicers affect each other - not how the different two measures are affected.

Yes i didn't read that correctly. My solution is for a different problem.

 

You want to affect the lines in the line chart, correct?

Regards,
Sérgio Silva

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

Check out my blog for tips and tricks about Power BI: https://pbibits.wordpress.com/

Yes correct. So if I choose April 2021 on the left the blue line should only show data for April 2021. And if I choose May 2021 on the right the green line should show data for May 2021.

So blue line for April 2021 and green line for May 2021 - both in the same chart.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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