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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Adding two different columns from two different tables and grouping

Hi Guys,

 

I have two different tables SalesLineQTY and ScheduledQty.they are joined to common DATE table in a model.

I want to add ScheduleNeedQty and QtyOnSalesLine columns which will display the sum grouped by Item No_.

I tried using sum and simple "+"  but not getting required output as column from other table does not populate in DAX editor.Bit confused with  which expression to be used with SUMMARIZE function .

 

SalesLine.PNG

prodOreder .PNG

 

 

 

 

 

 

 

 

 

 

Any suggestion/help would be appreciated.

 

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi DAX_Learner,

 

You may try dax formula below:

 

Temp_Table =
SUMMARIZE (
    SalesLineQTY,
    SalesLineQTY[No_],
    "QtyOnSalesLine", SUM ( SalesLineQTY[QtyOnSalesLine] ),
    "ScheduleNeedQty", SUM ( ScheduledQty[ScheduleNeedQty] )
)

Regards,

Jimmy Tao

Anonymous
Not applicable

Thank you for your suggestion @v-yuta-msft

Actually I want to add ScheduleNeedQty and QtyOnSalesLine columns (which belongs to different tables) and display the output as per Item_No grouping.

HI DAX_Learner,

 

You can use ADDCOLUMNS() instead, please refer to: https://msdn.microsoft.com/en-us/query-bi/dax/addcolumns-function-dax

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Addcoulmn  does not  work.

Below is the BI model created.All the tables are connected using NO_ key (Removed Earlier relationship with General date table)

Need to add  different columns from highlighetd tables to get values as per Item no.

 

Data_new.PNG 

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.