Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Count function

Hi All,

What is the meaning of the below expression?

Count({<[ON/OFF Pathway]={'OFF'} >} Distinct HSP_ACCOUNT_ID), 0)

1 Solution

Accepted Solutions
jagan
MVP & Luminary
MVP & Luminary

HI,

I think you missed some part of the expression in the beginning, I guess it would be either If() or Alt().  The above expression counts the Distinct HSP_ACCOUNT_ID which is having ON/OFF Pathway as {'OFF'}.

Hope this helps you.

Regards,

Jagan.

View solution in original post

7 Replies
sunny_talwar

I think you have a additional (,0)) thing at the end which may be part if statement. But this part (Count({<[ON/OFF Pathway]={'OFF'} >} Distinct HSP_ACCOUNT_ID)) means that you are distinctly counting HSP_ACCOUNT_ID where [ON/OFF Pathway] is OFF

HTH

Best,

Sunny

qlikviewwizard
Master II
Master II

Hi sunindia

Thank you for your reply. Yes, I confused with ,0. 

sunny_talwar

Ya I think this expression by itself with ,0) at the end will give you an error.

Kush
MVP
MVP

assuming you have expression

alt(Count({<[ON/OFF Pathway]={'OFF'} >} Distinct HSP_ACCOUNT_ID), 0)



First - You are counting the distinct values of HSP_ACCOUNT_ID associated with [ON/OFF Pathway] where value is 'OFF'.

If there is no values of HSP_ACCOUNT_ID associated with [ON/OFF Pathway] alt function returns zero

qlikviewwizard
Master II
Master II

Kush141087


I am also guessing the same. But it look like if function. But actually not.

jagan
MVP & Luminary
MVP & Luminary

HI,

I think you missed some part of the expression in the beginning, I guess it would be either If() or Alt().  The above expression counts the Distinct HSP_ACCOUNT_ID which is having ON/OFF Pathway as {'OFF'}.

Hope this helps you.

Regards,

Jagan.

View solution in original post

qlikviewwizard
Master II
Master II

Hi jagan,Kush141087,

Actual expression was this. It was my mistake not seen keen.

Thank you for your answers.

=If(Getpossiblecount([ON/OFF Pathway])>1 OR [ON/OFF Pathway]='OFF', Count({<[ON/OFF Pathway]={'OFF'} >} Distinct HSP_ACCOUNT_ID), 0)