Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

rank and count related query

Hi Experts,

My source like below..

 

Nametypetypeid
aaanondealGRp
bbbcnf1X1
cccfv2X1
dddnondealGRP
fffcnf1X1
xxxFD2X1
yyyRDGRP
zzzFDGRP
eeeRD1X1

from there we need want rank and count of type id.

but here that count only we need nondeal and cnf,fv this three only need count and remaning as usual display..

I am expacted o/p is ..

           

typecnfFDFDfvnondealnondealRD
Namerankno of typeidtypeid1X12X1GRPGRPGRp
aaa110000010
bbb111000000
ccc110001000
ddd110000100
eee200000001
fff111000000
xxx200100000
yyy200000001
zzz200010000
4 Replies
shiveshsingh
Master
Master

T:LOAD * INLINE [

 

  Rank , count

1,100

2,95

3,80

4,60

-,-

-,-];

load if(Rank='-',0,Rank) as Rank,

if((count='-'),0,count) as Count

Resident T;

drop table T;

Anil_Babu_Samineni

Script:

Set Nullinterpret = '-';

NullasValue Rank, count;

Set NullValue = '0';

Table:

LOAD *, RowNo() as ID Inline [

Rank , count

1,100

2,95

3,80

4,60

-,-

-,-

-,-

];

OR In Front end

Alt(count, 0)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Shivesh,

My rank and count is calculated dimension in UI level. not in Script level.

Thanks

NAni

shiveshsingh
Master
Master

Hi

Use Alt function in UI