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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.