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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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