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

How to get the union of two result sets from two slicers on the same table?

 

example data:

 

Account     Date      PartNumber

A                2017       1

B                2017       2

C                2017       1

D                2017       4

A                2016       1

B                2016       3

C                2016      2

D                2016      1

 

I need to let my users use 2 slicers to select an Account and a Date and then use another pair of slicer on the same table to select a second Account/Date to compare with.

 

EX: In above user selected Account B and Date 2017.  

      In second set of slicers they selected C and 2016

 

I can do this visually by Format->Edit Interactions so one KPI ignores the other filer, etc

and use FirstNonBlank to get the selected account. 

 

However I would like a Dax expression that gives me the union of data form the table for B/2017 and C/2016.  

Is this possible?  I currently get Zero rows in any of my Dax queries. I think (?) because the filters being applied

are "and"ed together and no account is both B and C at the same time.  

 

Sorry for  doing a crappy job explaining it 🙂

 

I want to be able to get a internediate table with the following:

Account     Date      PartNumber

B                2017      2

 

C                2016      2

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Your intuition here is correct in that ... having 2 slicers that are hooked up with relationships to your fact tables, are going to AND them together and cause both to be applied, and thus... no rows.

 

You will likely need to nuke the relationships and force all the filtering to happen via the magic of dax.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Your intuition here is correct in that ... having 2 slicers that are hooked up with relationships to your fact tables, are going to AND them together and cause both to be applied, and thus... no rows.

 

You will likely need to nuke the relationships and force all the filtering to happen via the magic of dax.

That's what I figured. Had hoped there was another way. Thanks

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.