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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jkay27
Helper I
Helper I

Union of two tables with no relation

Hi,

 

Hoping there's a simple explanation to this - I have two tables, one containing two columns: "company" and "basis". The other table contains a single "basis" column. The first table's data is created via the DAX below, and is filtered based on a 1:1 cardinality between Overview and the EAD table (and a slicer). 

 

EAD = SELECTCOLUMNS('Overview',"Company",Overview[Company],"Basis",Overview[Basis])

 

1st table (EAD)

Company1 Basis1

Company2 Basis2

Company 3 Basis3

 

2nd table (Basis List)

Basis 4

Basis 5

Basis 6

 

I would effectively like to select the "basis" column from table 1 and table 2, then union them, but can't figure out a way to ensure I don't lose my filtering in table 1, as table 2 has no relation to table 1 nor the base "overview" table.

 

Desired output

If company1 selected:

 

Basis1

Basis 4

Basis 5

Basis 6

 

Does anyone know how I can achieve this?

 

 

Many thanks

Joel

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @jkay27,

 

Please check the following steps as below.

 

1. Create a calculated table as below.

 

ba = UNION(VALUES(Basis[Basi]),VALUES(EAD[Basis]))

2. Create a measure and filter the table visual using the measure, just make the measure is 1.

 

Measure = var va = MAX(ba[Basi])
var sele = CALCULATE(MAX(EAD[Basis]),ALLSELECTED(EAD))
var al = VALUES(Basis[Basi])
return
IF(va in al || sele =va ,1,0)

Then we can get the result as below.

 

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @jkay27,

 

Please check the following steps as below.

 

1. Create a calculated table as below.

 

ba = UNION(VALUES(Basis[Basi]),VALUES(EAD[Basis]))

2. Create a measure and filter the table visual using the measure, just make the measure is 1.

 

Measure = var va = MAX(ba[Basi])
var sele = CALCULATE(MAX(EAD[Basis]),ALLSELECTED(EAD))
var al = VALUES(Basis[Basi])
return
IF(va in al || sele =va ,1,0)

Then we can get the result as below.

 

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

 

 

Hi @jkay27,

 

To create a measure not a calculated column.

 

Measure Found2 = var va = MAX(FINAL[Measure])
var selected = CALCULATE(MAX('Overview'[Measure]),ALLSELECTED('Overview'))
var allMeasures = VALUES('Exit Assumptions'[Measure])
return
IF(va in allMeasures || selected = va ,1,0)

 

2.PNG3.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Great, thanks Frank - didn't realised I'd clicked the wrong button. This works perfectly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors