Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zied_ahmed1
Specialist
Specialist

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
sunny_talwar

What is your expression right now?

zied_ahmed1
Specialist
Specialist
Author

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

sunny_talwar

May be like this

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

zied_ahmed1
Specialist
Specialist
Author

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
Specialist
Specialist
Author

this is for country=MAR not other countries too

Capture.PNG

sunny_talwar

Yes... may be this

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

zied_ahmed1
Specialist
Specialist
Author

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

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

sunny_talwar

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
Specialist
Specialist
Author

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