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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
NeilC
Frequent Visitor

Measure filtered by slicer

HI all

 

I have a date slicer that puts a measure into a card (call it Period 1). I have a 2nd date slicer that puts a measure in a 2nd card (call it Period 2). I want a 3rd card which shows the percentage difference between Period 1 and Period 2. 

 

Can anyone help me on what the best approach for this is? Havent got to grips with DAX yet, so hope there is something simple I can use.

 

When I have a card showing a slicer filtered figure, can I reference this new filtered figure elsewhere, or do I have to apply the same filter each time I need that new figure?

 

Thanks

2 ACCEPTED SOLUTIONS
Eric_Zhang
Microsoft Employee
Microsoft Employee

@NeilC

In this case, I think you'll have to duplicate the table and apply slicers to those two tables and calculate the difference via a measure like 

diff = SUM(Table2[Calls])-SUM(duplicateTable2[Calls])

Capture.PNG

 

Check more details in the attached pbix.

View solution in original post

Thanks for the replies.

 

This will work. I can get a one on one comparison using this menthod. Not sure when I want to compare 10. Dont really want 10 duplicate tables 😉

 

Maybe Im trying to use Power BI in ways its not really designed for. I really thought there would be a very simple solution, but hours of searching have drawn a blank (for a working solution). I can do this in about 1 min in Excel 😞

 

Really appreicate the help. Thanks.

View solution in original post

4 REPLIES 4
Eric_Zhang
Microsoft Employee
Microsoft Employee

@NeilC

Have your tried create the 3rd measure = Period 1 - Period2? If it doesn't lead to what you want, could you please share any sample data, over ever better share the PBIX file? If possible, upload the pbix to a network drive(Onenote, Google drive etc) and share the link.

https://drive.google.com/open?id=0B_GOODlRIXtsSTRoN090aVNDMDA

 

Simply, I want to see the percentage difference between the 2 filtered figures (in the Cards)

 

The two figures cover the two selected date ranges, taken from the two sliders. So I want to see the percentage difference between card 2 and card 1. 

 

Thanks

Eric_Zhang
Microsoft Employee
Microsoft Employee

@NeilC

In this case, I think you'll have to duplicate the table and apply slicers to those two tables and calculate the difference via a measure like 

diff = SUM(Table2[Calls])-SUM(duplicateTable2[Calls])

Capture.PNG

 

Check more details in the attached pbix.

Thanks for the replies.

 

This will work. I can get a one on one comparison using this menthod. Not sure when I want to compare 10. Dont really want 10 duplicate tables 😉

 

Maybe Im trying to use Power BI in ways its not really designed for. I really thought there would be a very simple solution, but hours of searching have drawn a blank (for a working solution). I can do this in about 1 min in Excel 😞

 

Really appreicate the help. Thanks.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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