cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors