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
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

@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
Employee
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

@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
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.