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

Calculate difference based on two slicers

I have two charts that show the time take to move in each step of a process.

Both charts have there own respective slicer associated with it to select a month.
How would I create a measure to look up the values based on the month selected in order to calculate the difference

 

Thank you

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @BInewbie,

 

Please share sample data of your tables so that we can provide you appropriate DAX.

Here is an example for you.

 

  1. Enter the data accordingly.
  2. Create the three measures as below:
sumtable1 = CALCULATE(SUM(Table1[take]),ALLSELECTED(Table1[Month1]))
sumTable2 = CALCULATE(SUM(Table2[Take]),ALLSELECTED(Table2[Month2]))
look up the values = [sumtable1]-[sumTable2]

Then we can get the result as the picture below.

 

1.jpg

 

For more information, please check the pbix as attached.

https://www.dropbox.com/s/vir7f6ilq5bzhog/Calculate%20difference%20based%20on%20two%20slicers.pbix?d...

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @BInewbie,

 

Please share sample data of your tables so that we can provide you appropriate DAX.

Here is an example for you.

 

  1. Enter the data accordingly.
  2. Create the three measures as below:
sumtable1 = CALCULATE(SUM(Table1[take]),ALLSELECTED(Table1[Month1]))
sumTable2 = CALCULATE(SUM(Table2[Take]),ALLSELECTED(Table2[Month2]))
look up the values = [sumtable1]-[sumTable2]

Then we can get the result as the picture below.

 

1.jpg

 

For more information, please check the pbix as attached.

https://www.dropbox.com/s/vir7f6ilq5bzhog/Calculate%20difference%20based%20on%20two%20slicers.pbix?d...

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi @BInewbie,

 

Does this make sense? If so, kindly mark the answer as solution please. Thanks!

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.