Forum Discussion
Luke_H
6 years agoNew Member
Multiple Costs For Same Product over time
Hi There, I am wanting some help with a cost table that has the same product code but over a few years with varying costs over that time so I can correctly do some profit and margin analysis for ...
amitchandak
Super User
6 years agoAssume this is the price table and you want to use the same in sales. These two columns can help
//New column in price
End date of price = minx(filter(price,price[Product]=earlier(price[Product]) && price[Date]>earlier(price[Date])),price[Date])
//new Column in sales
In sales table
minx(filter(price,sales[Product]=price[Product] && sales[sales Date]>=price[Date] && sales[sales Date]<price[End date of price]),price[Date])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin