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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Creating Dimtable with DAX

Hi,

 

I am creating a dimtable from four different tables. I am using DISTINCT to select the columns.

The columns are Service and Type. As you see in the DAX formula and the screenshot I have only Service in my dimtable.

I want to include Type column in this table. So I want to extend this DAX formule with Type. How must I do this?

 

Dimtable = DISTINCT(UNION(DISTINCT('Loan'[Service]), DISTINCT('Loan'[Service]), DISTINCT(Borrower'[Service]), DISTINCT('Pipeline'[Service])))

 

dimtable.png

 
1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

assuming that all your tables have the column [Type], you can use this code

Dimtable =
DISTINCT (
    UNION (
        SUMMARIZE ( 'Loan', 'Loan'[Service], 'Loan'[Type] ),
        SUMMARIZE ( 'Borrower', 'Borrower'[Service], 'Borrower'[Type] ),
        SUMMARIZE ( 'Pipeline', 'Pipeline'[Service], 'Pipeline'[Type] )
    )
)

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.