Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

looping functions in Expressions

HI Qlikers,

i have a pivot table of stock with buyer and date as dimension and stock as expressions.

now i want to compare for each date if the stock is continuously same then we should display that value to that respected dates otherwise zero has to be dispalyed.

Thanks in Advance

Sampath Botla

3 Replies
Not applicable
Author

you can address at the script level.

load

if(stock=peek(stock),stock, 0) as stock

...

...

resident <tab>

order by <date>;

Not applicable
Author

if you want to do it in the expression say like this.

if (stock=above(stock), stock, 0)

if it is a pivot table

if (stock=before(stock), stock, 0)

Not applicable
Author

i have written a big expression which can be done in script level.

Thank you