Forum Discussion
Sold Value counted from two Pricelist
- 5 years ago
hnowotny17 , Try a new column like
Switch( True(),
[Date] >= date(2020,01,01) && [Date] <= date(2020,04,30) , [Pricelist S1] * [sold quantity],
[Date] >= date(2020,05,01) && [Date] <= date(2021,01,31) , [Pricelist S2] * [sold quantity],
blank()
)
Hi hnowotny17,
Here's an example based on test data. In the image you'll see that this seperates the calculation betweeen pre and post april 2020 data. (The sales amount * 1 and *1000 are just to show the difference, replace this with your quantity*price1 and quantity*price2 logic)
Calculate2Prices =
CALCULATE (
SUM ( FactSales[Sales Amount] ) * 1,
FILTER ( DimDate, DimDate[MonthKey] >= 202001 && DimDate[MonthKey] <= 202004 )
)
+ CALCULATE (
SUM ( FactSales[Sales Amount] ) * 10000,
FILTER ( DimDate, DimDate[MonthKey] >= 202005 && DimDate[MonthKey] <= 202101 )
)
Hope that helps!
Best regards,
Tim
- hnowotny175 years ago
Helper I
Dear timg,
Thank you for your time! I follow your steps, it took me little bit longer to understand (as I am not profi user of PBI), but in the end it worked!
Thank you again and have a nice day,
Jan N