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