Forum Discussion
Getting previous row value - Problem Blanks
- Anonymous3 years ago
Hi Justiy ,
I have created a simple sample, please refer to it to see if it helps you.
Create a measure.
Sales Gr = VAR Cur_Index = MAX ( Data[data] ) VAR Pre_Index = Cur_Index - 1 VAR Pre_Value = CALCULATE ( MAX ( Data[Sales] ), FILTER ( ALL ( Data ), Data[data] = Pre_Index ) ) VAR Cur_Value = CALCULATE ( MAX ( Data[Sales] ), FILTER ( ALL ( Data ), Data[data] = Cur_Index ) ) RETURN Cur_Value - Pre_ValueIf I have misunderstood your meaning, please provide more details with your desired output and pbix file without priavcy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Justiy ,
I have created a simple sample, please refer to it to see if it helps you.
Create a measure.
Sales Gr =
VAR Cur_Index =
MAX ( Data[data] )
VAR Pre_Index = Cur_Index - 1
VAR Pre_Value =
CALCULATE (
MAX ( Data[Sales] ),
FILTER ( ALL ( Data ), Data[data] = Pre_Index )
)
VAR Cur_Value =
CALCULATE (
MAX ( Data[Sales] ),
FILTER ( ALL ( Data ), Data[data] = Cur_Index )
)
RETURN
Cur_Value - Pre_Value
If I have misunderstood your meaning, please provide more details with your desired output and pbix file without priavcy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Justiy3 years agoRegular Visitor
Yes it works. Thanks.
My problem was that I needed to add to my filter - ALL() as you did.