Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

sagarrahul
Contributor

main num

hii good morning to all

i am having a problem in this

this is my code

"=if(len(CLM_XGEN_CLAIM_NUM)<=16,Count({<CLM_LEVEL_OF_CARE={'Secondary'}>}distinct CLM_XGEN_CLAIM_NUM))"

this is my column below 

CLM_XGEN_CLAIM_NUM
RC-HS15-10319322-1
RR-HS15-10340556

in this i dnt want the supplementary 'CLM_XGEN_CLAIM_NUM'  coun i want only main count only 

as given below

EG :

RC-HS15-10319322-1
RR-HS15-10340556

so count should be 1 as main claim is RR-HS15-10340556



can anyone help me in this


8 Replies

Re: main num

Hi,

try like

=if(len(CLM_XGEN_CLAIM_NUM)<=16 and len(KeepChar(CLM_XGEN_CLAIM_NUM,'-'))=2,Count({<CLM_LEVEL_OF_CARE={'Secondary'}>}distinct CLM_XGEN_CLAIM_NUM))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
MVP
MVP

Re: main num

Try like:

Count({<CLM_XGEN_CLAIM_NUM={"=len(CLM_XGEN_CLAIM_NUM)<=16"}, CLM_LEVEL_OF_CARE={'Secondary'}>}distinct CLM_XGEN_CLAIM_NUM)

sagarrahul
Contributor

Re: main num

ty max

this is my table

       

CLM_XGEN_CLAIM_NUMCLM_INTIMATION_DATECLM_LEVEL_OF_CAREICD_CODE_LEVEL1_orgClaim_TypeICD Code Blacklisttotal count of claims
RC-HS15-10318402-122-Jan-2016SecondaryJ34.2-1-
RC-HS15-10318402-209-Feb-2016SecondaryJ34.2-1-
RC-HS16-1035232517-May-2016SecondaryK76.2-11




-3-

as there are 3 claims but i want only main claim in my total count of claims column that is 1

but its not showing its total in yellow column .

can u help me in this

MVP
MVP

Re: main num

Did you try the expression I suggested above? So you want all three rows to be displayed, but the count to work or one, right? Could you post your sample qvw?

sagarrahul
Contributor

Re: main num

ur expression is showing error

Re: main num

Hi,

tresesco solution is correct just missed to closed " in set analysis.

Count({<CLM_XGEN_CLAIM_NUM={"=len(CLM_XGEN_CLAIM_NUM)<=16"}, CLM_LEVEL_OF_CARE={'Secondary'}>}distinct CLM_XGEN_CLAIM_NUM)

try that solution.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
sagarrahul
Contributor

Re: main num

     i  want this output     

CLM_XGEN_CLAIM_NUMCLM_INTIMATION_DATECLM_LEVEL_OF_CAREICD_CODE_LEVEL1_orgClaim_TypeICD Code Blacklisttotal count of claimsValuestatus
RC-HS15-10318402-122-Jan-2016SecondaryJ34.2-1-0.000Outlier
RC-HS15-10318402-209-Feb-2016SecondaryJ34.2-1-0.000Outlier
RC-HS16-1035232517-May-2016SecondaryK76.2-111.000Outlier




-311.000Outlier
MVP
MVP

Re: main num

Thanks max. Good catch. Corrected now.