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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
AH
Creator III
Creator III

Minimum Date calculation

Hi,

I have couple of dates for a single customer. So I want to calculate the first date as Account start date. I was trying to use this in the script but its showing invalid expression.

Min((Date#(InstallDt,'YYYYMMDD')) as [Account Start Date])

Am I doing wrong somewhere?

Thanks,

Shan

1 Solution

Accepted Solutions
sasikanth
Master
Master

try like below

aggr(min(Installdt),Customer_ID)

as a calculated Dim in chart

View solution in original post

18 Replies
rubenmarin

Hi, try removing 1 '(' after Min():

Min(Date#(InstallDt,'YYYYMMDD')) as [Account Start Date])

anbu1984
Master III
Master III

Also remove last ')'

Min(Date#(InstallDt,'YYYYMMDD')) as [Account Start Date]

AH
Creator III
Creator III
Author

Still Showing Invalid Expression.Inv.PNG.png

Thanks,

Shan

rubenmarin

Hi Shan,

For [Account Start Date]  you are using Min, to do this you need to have a Group By clause?

In case you have the Group By clause yo need to add all non-aggregated fields to the group by, or use funcions like MinString(), Min(), Sum() to convert non-aggregated fields into aggregated fields.

Hope this helps

Not applicable

Hi,

Try this

Min(Date(InstallDt,'YYYYMMDD')) as [Account Start Date]

or Min(Date#(InstallDt,'YYYYMMDD')) as [Account Start Date]

AH
Creator III
Creator III
Author

The expression is not working.

AH
Creator III
Creator III
Author

Ruben,

No I am not using any Goup By Clause.

Thanks,

Shan

sasikanth
Master
Master

hi

try some thing like

date#(min(Installdt),'YYYYMMDD') as [Account start date]

AH
Creator III
Creator III
Author

Actually i am using this Minimum Date (Account Start date) in the Chart. Is there any way i can change the dimension and make the expression there to get the Minimum date?

Thanks,

Shan