Forum Discussion
How to get the Percent Difference from previous data
- Anonymous2 years ago
Hi, rkxiii
You can try the following methods.
Measure:
Diff = Var _Prevdate=CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Date]<SELECTEDVALUE('Table'[Date]))) Var _PrevYield=CALCULATE([Yield],FILTER(ALL('Table'),[Date]=_Prevdate)) RETURN IF(_PrevYield=BLANK(),BLANK(),[Yield]-_PrevYield)Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, rkxiii
You can try the following methods.
Measure:
Diff =
Var _Prevdate=CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Date]<SELECTEDVALUE('Table'[Date])))
Var _PrevYield=CALCULATE([Yield],FILTER(ALL('Table'),[Date]=_Prevdate))
RETURN
IF(_PrevYield=BLANK(),BLANK(),[Yield]-_PrevYield)
Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- rkxiii2 years agoFrequent Visitor
Hi, Thank you very much for your help. This is the solution I am looking for. Again, Thank you very much!
- rkxiii2 years agoFrequent Visitor
Hi,
Also could you please include the Model Name for this solution? Thank you very much for your help!- rkxiii2 years agoFrequent Visitor
Its okay now. I just Filter All Except the Model Name. Thank you!