Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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?
Hi
using RowNo() like a trick
if(previous(dimension)=dimension or rowno() =1 ,0,1)
Hi,
I think you'll have to use a calculated dimension
for example is like this.
=if(field2='field2value',field1)
Is that good or not?
Hi Kevin,
this is in script not in a pivot.
So you're sayin' this is on the load script?
Hi
using RowNo() like a trick
if(previous(dimension)=dimension or rowno() =1 ,0,1)
Hi Staffan,
maybe this
if(previous(dimension)=dimension or RowNo()=1 ,0,1)
Regards,
Antonio
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.