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
paliman
Frequent Visitor

Difference between categories based on user´s selecction

Hello everyone.

 

This is my first post here. I´ve been searching for a while without finding what I need.

 

I have a sales table for different products and I want to build a dynamic measure to calculate the difference between any two categories based on user's selection. I've made a little simplification of my model in excel for better understanding, please see the screenshot below:

 

Dax Question.PNG

 

So I want the user to pick any two categories and come with the difference in total sales based on that selection. Ideally with two slicers called "Category 1" and "Category 2", but if it's easier with only one slicer, that'll do fine too

 

I hope it is clear enough, and any suggestion will be greatly appreciated.

 

Many thanks in advance

 

Pablo.

1 ACCEPTED SOLUTION
paliman
Frequent Visitor

Hi

 

Just to tell you that I found the solution here

 

https://stackoverflow.com/questions/51388963/how-to-get-the-difference-between-the-values-selected-b...

 

Thanks to all who took the time to read my post and think about it

 

Pablo

View solution in original post

1 REPLY 1
paliman
Frequent Visitor

Hi

 

Just to tell you that I found the solution here

 

https://stackoverflow.com/questions/51388963/how-to-get-the-difference-between-the-values-selected-b...

 

Thanks to all who took the time to read my post and think about it

 

Pablo

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.

Top Solution Authors