Forum Discussion
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 .
Any suggestion/help would be appreciated.
4 Replies
- v-yuta-msftCommunity 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
- AnonymousNot 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.
- v-yuta-msftCommunity Support
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