Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

zied_ahmed1
Contributor III

how to count only one row in this is example

Hello ,

this is my problem

i have fields

car

date

parc

country

i need if in one date for one car to count juste one row not 2 event if have 1 in the parc FR and 1 in the parc IT

(IT=1 and FR = 1 the result one row (total 1) and this is the picture of the example

Problem.png

thanks for your help

11 Replies

Re: how to count only one row in this is example

What is your expression right now?

Highlighted
zied_ahmed1
Contributor III

Re: how to count only one row in this is example

i have a simple expression count(Dossier) i need when i have (IT= 1 and FR = 0 result must be 1) or when i have

(IT=0 and FR = 1 result of count is 1 ) and for the (IT=1 and FR = 1 result must be 1 not 2 ) this must applicate to the country MAR

Re: how to count only one row in this is example

May be like this

Max(Aggr(Count(Dossier), car, date, country))

zied_ahmed1
Contributor III

Re: how to count only one row in this is example

don't work maybe we forget the parc

just one another thing when i have IT=0 and FR = 0 the count of dossier wil be 0

zied_ahmed1
Contributor III

Re: how to count only one row in this is example

this is for country=MAR not other countries too

Capture.PNG

Re: how to count only one row in this is example

Yes... may be this

Max(Aggr(Count(Dossier), car, date, parc, country))

zied_ahmed1
Contributor III

Re: how to count only one row in this is example

it works thanks..just i need it in this other expression please :

Count({<$(vSetPeriodPres),country={'MAR'},Groupe_Complet_Vide={'3,5,2'}>}Dossier)

Re: how to count only one row in this is example

May be like this

Max({<$(vSetPeriodPres),country={'MAR'},Groupe_Complet_Vide={'3,5,2'}>}Aggr(Count({<$(vSetPeriodPres),country={'MAR'},Groupe_Complet_Vide={'3,5,2'}>}Dossier), car, date, parc, country))

zied_ahmed1
Contributor III

Re: how to count only one row in this is example

it gives the number 1...i have for example 400 dossiers i need just to eleminate 'dossiers' who have 2 dossiers for one car in one date for country morocco

Community Browser