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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors