Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
realpixel
Creator
Creator

count

Hello,

Under a part of my chart.

I want to count the column “LOCATIONS” with fields “IMMAT” and “DATE” only once

In case, only once, because the date is the same 29/11/2013 and the IMMAT is the same (301)

DATE

IMMAT

HEURE

LOCATIONS

29/11/2013

301

23:14:09

SOCO

29/11/2013

301

23:14:30

SOCO

29/11/2013

301

12:45:54

SOCO

29/11/2013

301

14:48:01

SOCO

29/11/2013

301

17:15:43

SOCO

5

The result must be like that

DATE

IMMAT

HEURE

LOCATIONS

29/11/2013

301

23:14:09

SOCO

29/11/2013

301

23:14:30

SOCO

29/11/2013

301

12:45:54

SOCO

29/11/2013

301

14:48:01

SOCO

29/11/2013

301

17:15:43

SOCO

1

Someone have an idea?

5 Replies
afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi.

count(distinct DATE & IMMAT )

Alessandro Furtado

furtado@farolbi.com.br
realpixel
Creator
Creator
Author

Thank you, it's works but there some value are null in "LOCATIONS" field.

How to count only the value not null?

Expression in « LOCATIONS » is

=[LOCATIONS]

I have create a new field for the expression below :

count(distinct HMDATE1 & HMIMMAT2)

DATE

IMMAT

HEURE

LOCATIONS

count(distinct HMDATE1 & HMIMMAT2)

29/11/2013

301

23:14:09

SOCO

1

29/11/2013

301

23:14:30

SOCO

1

29/11/2013

301

12:45:54

SOCO

1

29/11/2013

301

14:48:01

SOCO

1

29/11/2013

301

17:15:43

SOCO

1

5

1

Is not possible to have expression =[LOCATIONS] combined with expression count(distinct HMDATE1 & HMIMMAT2) to have only one column like the chart under?

DATE

IMMAT

HEURE

LOCATIONS

29/11/2013

301

23:14:09

SOCO

29/11/2013

301

23:14:30

SOCO

29/11/2013

301

12:45:54

SOCO

29/11/2013

301

14:48:01

SOCO

29/11/2013

301

17:15:43

SOCO

1


Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try count({<LOCATIONS={'*'}>}distinct LOCATIONS)


talk is cheap, supply exceeds demand
realpixel
Creator
Creator
Author

Thank you for your reply.

Expression count({<LOCATIONS={'*}>}distinct LOCATIONS)

Return this error: Error in set modifier ad hoc element list

fred_s
Partner - Creator III
Partner - Creator III

{'*'} or {'*}. Maybe there's one ' missing?