Forum Discussion
How to join a value from another table in a calculated column (alternativ a measure)
- Anonymous2 years ago
Hi gehe_bbe ,
May I ask if your requirement is to add this column to the table Sales?If yes, then you can use Power Query for that:
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 2 years ago
Hi
thanks for this approach, at the moment am not sure if it's good to join the tables, but yes, this is a possible way. Afer researching on internet I found out that it could be done in this way:
InitialStock = CALCULATE(SUM(InitialStock[StockQty]),FILTER(ALL(InitialStock),InitialStock[Branch]=EARLIER(Sales[Branch]) && InitialStock[Model] = EARLIER(Sales[Model]) && InitialStock[ActualPeriod] = EARLIER(Sales[ActualPeriod])))I tried it out in the file you send me and it works fine 😊 The name of thie ERALIER function is a little bit confusing but it gets the value of the row in the Sales table which can be uses for the filter.
I don't know how to attach the modified file...
Regards Steve
Hi gehe_bbe ,
May I ask if your requirement is to add this column to the table Sales?
If yes, then you can use Power Query for that:
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- gehe_bbe2 years agoFrequent Visitor
Hi
thanks for this approach, at the moment am not sure if it's good to join the tables, but yes, this is a possible way. Afer researching on internet I found out that it could be done in this way:
InitialStock = CALCULATE(SUM(InitialStock[StockQty]),FILTER(ALL(InitialStock),InitialStock[Branch]=EARLIER(Sales[Branch]) && InitialStock[Model] = EARLIER(Sales[Model]) && InitialStock[ActualPeriod] = EARLIER(Sales[ActualPeriod])))I tried it out in the file you send me and it works fine 😊 The name of thie ERALIER function is a little bit confusing but it gets the value of the row in the Sales table which can be uses for the filter.
I don't know how to attach the modified file...
Regards Steve