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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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