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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Matt_H_Clam
Frequent Visitor

Appending three calculated Tables in the PowerBI model into one table

Hi 

 

I have a model with three calculated tables containing a number of common columns, i want a single table with the colums ive identified with all the rows from each table ( so if table 1 has 20 rows, table 2 has 20 and table 3 has 35, id want 75 rows in total)

 

Ive used the following code to create it but its not quite worked, im missing some rows.   

 

Any thoughts?

 

Calculated UK Orders Invoices Forecast Combined =
SUMMARIZE(
    UNION(
        SELECTCOLUMNS('Calculated UK Forecast',
            "Source", 'Calculated UK Forecast'[Source],
            "Part ID", 'Calculated UK Forecast'[partid],
            "Outstanding Quantity", 'Calculated UK Forecast'[OS Quantity],
            "Total Quantity", 'Calculated UK Forecast'[forecastquantity],
            "Trader ID", 'Calculated UK Forecast'[reference],
            "Order ID", 'Calculated UK Forecast'[Orderid],
            "Unit Price (GBP)", 'Calculated UK Forecast'[Unit Price (GBP)],
            "Outstanding Value (GBP)", 'Calculated UK Forecast'[OS Value (GBP)],
            "Due Date", 'Calculated UK Forecast'[fpfindat]),
        SELECTCOLUMNS('Calculated UK orders',
            "Source", 'Calculated UK orders'[Source],
            "Part ID", 'Calculated UK orders'[partid],
            "Outstanding Quantity", 'Calculated UK orders'[OS Quantity],
            "Total Quantity", 'Calculated UK orders'[stockedquantity],
            "Trader ID", 'Calculated UK orders'[traderid],
            "Order ID", 'Calculated UK orders'[orderid],
            "Unit Price (GBP)", 'Calculated UK orders'[Unit Price (GBP)],
            "Outstanding Value (GBP)", 'Calculated UK orders'[OS Value (GBP)],
            "Due Date", 'Calculated UK Orders'[Due Date(EOM)]),
    SELECTCOLUMNS('Calculated UK invoiced',
            "Source", 'Calculated UK invoiced'[Source],
            "Part ID", 'Calculated UK invoiced'[partid],
            "Outstanding Quantity", 'Calculated UK invoiced'[Quantity],
            "Total Quantity", 'Calculated UK invoiced'[quantity],
            "Trader ID", 'Calculated UK invoiced'[traderid],
            "Order ID", 'Calculated UK invoiced'[orderid],
            "Unit Price (GBP)", 'Calculated UK invoiced'[homeunitprice],
            "Outstanding Value (GBP)", 'Calculated UK invoiced'[homenettvalue],
            "Due Date", 'Calculated UK invoiced'[tax date])

    ),
    [Source],
    [Trader ID],
    [Total Quantity],
    [Outstanding Quantity],
    [Part ID],
    [Order ID],
    [Unit Price (GBP)],
    [Outstanding Value (GBP)],
    [Due Date]
)
0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.