Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, I am trying to get row numbers only for those rows in a pivot table where an expression is not null. For eg:
if my table has following values
value
0
0
0
1200
123
120
232
I want the row numbers in a adjacent column to be displayed as:
value rownumber
0
0
0
1200 1
123 2
120 3
232 4
and so on.. any suggestions?
Hi
Null or 0? Your question and example do not tie up.
Assuming null - when loading the table containing value:
LOAD ...
value,
If(IsNull(value) = 0, 1 + Alt(Peek(RowNo), 0)) As RowNo,
...
HTH
Jonathan
sorry for the ambiguity in my question. It's 0 and not null and I want to implement this in the front end only, not the script.
You check on Suppress Zero Values in the Presentation tab which would remove the dimensions that hold a 0 as a value and then use RowNo()
Table:
Load
Value,
rowno() as RowNo
form Table.qvd (qvd)
where Value<>'0';
Concatenate(Table)
load Value
From Table.qvd (qvd)
where Value = 0;
Check this app
If you have two dimensions, then try this
Hi,
Try this....
LOAD * INLINE [
A, B
a
a, 0
a, 0
c
c, 12
c, 0
d,
e, 4
f, 10
g, 0
h, 156
];
Rank(count(total A)+if(sum(B)>0,Rank(if(sum(B)>0,RowNo()))))
Regards,
Garry
Hi Cheliyan,
Thanks for the answer. I get my answer from your example.
Thanks.
Best Regards,