Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have the following
sum((case when RAM_GEO_INC_SEG ='L'or RAM_GEO_INC_SEG ='M' then 1 else 0 end) +(case when coalesce(BORROWER_SEG,RAM_GEO_BORROWER_INC_SEG) ='L' or coalesce(BORROWER_SEG,RAM_GEO_BORROWER_INC_SEG) ='M'then 1 else 0 end) STB_CRA_CNT
can any send me Script for this please...it's urgent
Thnaks in advncae!!!!
Smiley
Hi Smiley,
Below should work.
sum(if((RAM_GEO_INC_SEG ='L'or RAM_GEO_INC_SEG ='M'),1,0))
thanks,
-RV
Hi Rajesh,
Thanks for ur replay,
but i want script for all the sql which i have mentioned above
sum(if((RAM_GEO_INC_SEG ='L'or RAM_GEO_INC_SEG ='M'),1,0) + if(isnull(BORROWER_SEG),if(RAM_GEO_BORROWER_INC_SEG='L',1,0),if(BORROWER_SEG='L',1,0)) OR if(isnull(BORROWER_SEG),if(RAM_GEO_BORROWER_INC_SEG='M',1,0),if(BORROWER_SEG='M',1,0)))
To begin with if you have a working sql statement you can simply reuse that in Qlikview:
MyTable:
SELECT xxx from yyy ...etc;
This way you don't have to convert the sql to Qlikview script.
But if you really want or need to... try this:
sum(
if(match(RAM_GEO_INC_SEG,'L','M'),1,0) +
if(alt(match(BORROWER_SEG,'L','M'),match(RAM_GEO_BORROWER_INC_SEG,'L','M')),1,0)
) as STB_CRA_CNT