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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

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.