Forum Discussion
schrodinger
4 years agoNew Member
Tracking Product wise price change
This is what the data looks like. Now, the problem statement is, I need to find the dates at which each product's price changed. This data keeps on updating on daily basis. I already have a sli...
- 4 years ago
Vijay_A_Verma 's solution worked like a charm aswell!
Price Change = IF(Sheet1[Rank]=1,TRUE(),(COUNTROWS(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID]) && Sheet1[Rank]=EARLIER(Sheet1[Rank])-1 && Sheet1[Cost]<>EARLIER(Sheet1[Cost])))>0))
rohit_singh
Solution Sage
4 years agoHi schrodinger ,
You can try something like this :
Price Change =
var _cost = max(Parts[Cost])
var _dt = max(Parts[Date])
var _prevdt =
CALCULATE(
max(Parts[Date]),
FILTER(
ALLEXCEPT(Parts, Parts[Part Number],Parts[Item ID]),
Parts[Date] < _dt
)
)
var _prevcost =
CALCULATE(
max(Parts[Cost]),
FILTER(
ALLEXCEPT(Parts, Parts[Part Number],Parts[Item ID]),
Parts[Date] = _prevdt
)
)
Return
if(_cost = _prevcost , "False", "True")
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
schrodinger
4 years agoNew Member
Vijay_A_Verma 's solution worked like a charm aswell!
Price Change = IF(Sheet1[Rank]=1,TRUE(),(COUNTROWS(FILTER(Sheet1, Sheet1[Item ID]=EARLIER(Sheet1[Item ID]) && Sheet1[Rank]=EARLIER(Sheet1[Rank])-1 && Sheet1[Cost]<>EARLIER(Sheet1[Cost])))>0))