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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.