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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.