Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
How to fetch the previous value in a column or row?

1 Answer

0 votes
by (47.2k points)

Hello Vaibhav,

You can use LOOKUP() or PREVIOUS_VALUE() in a calculated field to use or show values.

Using Lookup()

Ex: LOOKUP(SUM([Sales]),-1)  this would provide you the previous value of column-wise.

To change it down the table, Right click on the created field and go to compute using and select table(down)

Using PREVIOUS_VALUE()

Ex: PREVIOUS_VALUE(SUM(SALES)) previous is used only for roe operations. so it would be used row level calculation such as difference or % difference from.

Hope it helps!

Browse Categories

...