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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Comparing values from 2 different selections

I am trying to create a comparison page. I would like to have 2 slicers which allow you to select 2 websites that you would like to compare. On the dashboard I will have a single metric, repeated for each site you select, I would then like to show a variance value in the middle of the two values to show the difference.

 

I have already tried to display the values for each site in cards and then use the edit interactions to connect the slicer to the correct card which works fine. The variance card, in an ideal world, I would like to take the value presented in each card and do the calculation, but it seems that PowerBI doesn't work in this way.

 

I am struggling to find a way to do this, I am fairly new to PowerBI, if anyone could point me in the right direction it would be appreciated.

 

Comparison.PNG

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

Hi @Anonymous,

 

You can't use measure to compare difference between two slicer with same source. 

 

In my opinion, you can duplicate a table with same records(not has relationship) and use new table as source of one slicer. then you can use measure to compare difference between two selections.

Diff =
CALCULATE ( SUM ( Table[Amount] ), ALLSELECTED ( Table[Column] ) )
    - CALCULATE ( SUM ( NTable[Amount] ), ALLSELECTED ( NTable[Column] ) )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

You can't use measure to compare difference between two slicer with same source. 

 

In my opinion, you can duplicate a table with same records(not has relationship) and use new table as source of one slicer. then you can use measure to compare difference between two selections.

Diff =
CALCULATE ( SUM ( Table[Amount] ), ALLSELECTED ( Table[Column] ) )
    - CALCULATE ( SUM ( NTable[Amount] ), ALLSELECTED ( NTable[Column] ) )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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