cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
scottsen Memorable Member
Memorable Member

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

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
scottsen Memorable Member
Memorable Member

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

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

NuTek
Frequent Visitor

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

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

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors