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: 
Not applicable

syntaxe

hello ;   i m looking for the right syntaxe , i have  a code_client , he has a date for his creation (creation_client) and a date of the first cost estimate (date_devis) for the product, however a client can exist more then one time i want in my chart the  interval (date_devis-creation_client)  for the client but just the first cost estimate ...please help

if count(code_client) > 1

interval(min(date-devis) - creation-client)

7 Replies
sunny_talwar

Would you be able to share few lines of data with your expected output?

Not applicable
Author

hi , like you are seing the code_client :14941-3  existe more then one time i juste want the interval between the  tow dates for  the first occurence  of the code client

Capture.PNG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In an object where code_client must be one of the dimensions, the following simple expression will do wonders:

=floor(Min(date_devis) - création_client)

The basic assumption: each client has only one création_client date.

Best,

Peter

Not applicable
Author

thanks for your reply but still the same probelem , like you are seing the code_client :14941-3  existe more then one time i juste want the interval between the  tow dates for  the first occurence  of the code client


Capture.PNG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The data is a bit inconsistent. I was assuming that there was only one date_création_client per customer and that it would be smaller than the first date_devis. But the relation between those two dates jumps in all directions...

If I may assume that the fiurst occurrence of code_client is the one with the earliest date_creation_client date value, then you could create a new Straight table with a single dimension code_client and this expression:

=FirstSortedValue(date_devis,date_creation_client)-min(date_creation_client)

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Did you try my suggestion? If you create a straight table using the dimension and expression I mentioned earlier on, then what do you get?

Not applicable
Author

hii peter i fixed my table the client now has one and only date of creation  ,i still want the intervall between this date and the

first date-devis

Capture.PNG