Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression

Hi Friends

count(DISTINCT({<DAY = {">20"}>}[POLICY_No]))

Can some help me to rewrite the above expression in the correct way

15 Replies
swuehl
MVP
MVP

Doesn't look too bad, if DAY is a field with numbers.

Maybe check the brackets:

=COUNT({<DAY = {">20"}>} DISTINCT [POLICY_No])

eduardo_sommer
Partner - Specialist
Partner - Specialist

The ( after DISTINCT does not exist

Eduardo

maxgro
MVP
MVP

maybe

count(DISTINCT ({<DAY = {">20"}>} [POLICY_No]  ))          // original

count(DISTINCT  {<DAY = {">20"}>} [POLICY_No]  )            // modified

MK_QSL
MVP
MVP

Try

Count({<DAY = {">20"}>}Distinct [POLICY_No])

upaliwije
Creator II
Creator II
Author

Thanks all

But none of the expression is working

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you post your sample application?

Regards

ASHFAQ

its_anandrjs

Hi,

Let me explain this, but how this possible all the expression suggest are right please see the small example for understanding with small table and this data is dummy data.

Source:

LOAD * Inline

[

DAY, POLICY_No

20,15482

20,15863

10,145896

40,158456

30,125639

15,258741

12,256923

13,245855

];

And in the straight table take

Dimension:- DAY

Expression:- Count(DISTINCT  {<DAY = {">20"}>} [POLICY_No]  ) // If DAY has numeric values

upaliwije
Creator II
Creator II
Author

Hi Anand

Thanks. What you say is correct and my below expression is working very well.

sum({<DAY = {">20"}>}[AMOUNT])

But this one is not working

Count(DISTINCT  {<DAY = {">20"}>} [POLICY_No]  )

Pls help

ashfaq_haseeb
Champion III
Champion III

Hi try this.

Count({<DAY = {">20"}>} DISTINCT  [POLICY_No]  )



Regards

ASHFAQ