Discussion Board for collaboration on QlikView Scripting.
I have a problem building a flag in script. I have use previous and get a correct output, expect first row.
Here is my table.and this is for changeflag if(previous(dimension)=dimension ,0,1)
What I want is to get a 1 on the first row With a New Dimension. I think that the first 1 will be there because previous find null and compare it With the first row.
Any trix to avoid this scenario?
Go to Solution.
using RowNo() like a trick
if(previous(dimension)=dimension or rowno() =1 ,0,1)
I think you'll have to use a calculated dimension
for example is like this.
Is that good or not?
this is in script not in a pivot.
So you're sayin' this is on the load script?
if(previous(dimension)=dimension or RowNo()=1 ,0,1)
You can perhaps just try putting rowno()=1 check like:
if(if rowno()=1 or previous(dimension) <> dimension ,1 , 0)
Three similar answer, let give it a try.
The rowno() check will help me, thanks guys.