Previous row value of a dimension

Hello team,

I have a requirement to find the previous row value of a dimension field.

Eg: If current row is not equal to previous row then ‘R’ else ‘N’.

But the field is a dimension and its not a measure. Also, the lag function in quicksight works only for measures.

Is there any function to calculate this in QuickSight. I cannot use custom sql because I have joined two different datasources and the fields used in the case statement are from both the datasets.

Hello @Kripa_Magesh

What are the other fields in your dataset? Do you have any date fields?

Hello @Kripa_Magesh

It has been some time since we have heard from you. Do you still need help on this question or were you able to find a solution?

Hi @duncan ,

Yes, I do have date field and I was able to use lag function and it worked. Apologies for delayed response.

Thanks,
Kripa

1 Like