Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax with function Count

Hello everyone.

I would like percentages rather than values. So I tried to use the TOTAL with function Count but it does not work.

Does anyone have an idea?
 

count (DISTINCT{$<date_entree={"<>0"}>} Matricule)

/

count (DISTINCT TOTAL {$<date_entree={"<>0"}>} Matricule)

Thanks in advance,

Emmanuelle

--------------------------------------------------------------------------------------------------------------------------------------

Bonjour tout le monde,

J'aimerais avoir des pourcentages plutôt que des valeurs. Donc j'ai essayé d'utiliser le TOTAL mais cela ne marche pas.

count (DISTINCT{$<date_entree={"<>0"}>} Matricule)

/

count (DISTINCT TOTAL {$<date_entree={"<>0"}>} Matricule)

Quelqu'un aurait-il une idée ?

Emmanuelle

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

It seems correct, use ' instead of "

count (DISTINCT{$<date_entree={'<>0'}>} Matricule)

/

count (DISTINCT TOTAL {$<date_entree={'<>0'}>} Matricule)


Let me know

PrashantSangle

Hi,

try this,

num(

count (DISTINCT{$<date_entree={"<>0"}>} Matricule)

/

count (DISTINCT TOTAL {$<date_entree={"<>0"}>} Matricule) ,'#,##0.00%'

)

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
MK_QSL
MVP
MVP

Try USING ALL instead of TOTAL...

count (DISTINCT{$<date_entree={'<>0'}>} Matricule)

/

count (DISTINCT ALL {$<date_entree={'<>0'}>} Matricule)


Try with both single and double quotes...

i.e. ' ' and " "

Not applicable
Author

It does not work either...

I think it comes from the function COUNT with DISTINCT and TOTAL. But I do not know how to express it otherwise !

Not applicable
Author

It does not work with the num.

Not applicable
Author

It does not work with the ALL... I tried with the ' and the ", not better.

PrashantSangle

Hi,

individually did you get  value for your expression,

count (DISTINCT{$<date_entree={"<>0"}>} Matricule)

and

count (DISTINCT TOTAL {$<date_entree={"<>0"}>} Matricule)


Your date_entree field contain date value??


Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
MK_QSL
MVP
MVP

=NUM(COUNT(DISTINCT {<date_entree= {'<>0'}>}Matricule) /COUNT(DISTINCT  {<date_entree= {'<>0'}>} ALL Matricule),'#,##0.00%')

PrashantSangle

Hi,

try this.

num(

count (DISTINCT{$<date_entree={"<>0"}>} Matricule)

/

count ({$<date_entree={"<>0"}>} Matricule) ,'#,##0.00%'

)

hope it will help you.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂