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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Daniel48
Helper I
Helper I

Union three columns across three tables

Hello, 

 

Is it possible to create a column that only has distinct values from 3 columns on 3 different tables. I found the formula below but it keeps giving me errors.

 


Thank you in advance!

 

 

Country = FILTER(
    DISTINCT(UNION(VALUES('4 - Data (CSAT)'[Country]), VALUES('4 - Data (Voice)'[Country]))),
    [Country] <> BLANK()
)

 

 

1 ACCEPTED SOLUTION

try this

 

Master Policy Table =
FILTER (
    DISTINCT (
        UNION (
            VALUES ( 'policy finance_Initial'[policy_uniqueid] ),
            VALUES ( 'policy finance_target'[policy_uniqueid] ),
            VALUES ( 'policy premium'[policy_uniqueid] )
        )
    ),
    [policy_uniqueid] <> BLANK ()
)

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Before you can do a UNION your columns need to have the same name.  Use SELECTCOLUMNS  to rename them as needed.

Master Policy Table = FILTER(DISTINCT(UNION(VALUES('policy finance_Initial'[policy_uniqueid]),VALUES('policy finance_target'[policy_uniqueid]),VALUES('policy premium'[policy_uniqueid])),
    [policy_uniqueid] <> BLANK()))
 
I have renamed the columns but I am getting the error. Too many arguments were passed to the DISTINCT function. The maximum argument count for the function is 1. I can get it with two columns but not three

try this

 

Master Policy Table =
FILTER (
    DISTINCT (
        UNION (
            VALUES ( 'policy finance_Initial'[policy_uniqueid] ),
            VALUES ( 'policy finance_target'[policy_uniqueid] ),
            VALUES ( 'policy premium'[policy_uniqueid] )
        )
    ),
    [policy_uniqueid] <> BLANK ()
)

That worked perfectly! Thank you for all of your help!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors