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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.