Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello There,
How to count or apply in expression the first date to the last date?
sample data:
first date | last date
01/25/2017 06/06/2017
Ans.
=4 months
how can i =Count(first date) to (last date)
I need you're Help guys.
Best Regards,
Bing
Hi, Qlik stores dates as text and as numbers. You could try just LastDate-FirstDate and will give you the number of days in between, any decimal will be the difference in time. Once you have the number of days you can just divide it by 30 and get an estimation of the number of months.
If you need to truncate the decimals you could use Floor: Floor((LastDate-FirstDate)/30) and you'll get your 4 months
If LastDate-FirstDate doesn't work there could be an issue with the data type which is a different issue.
Hope this helps,
L
You need to create master calendar and simple expression using Count(Measure)
Hi, Qlik stores dates as text and as numbers. You could try just LastDate-FirstDate and will give you the number of days in between, any decimal will be the difference in time. Once you have the number of days you can just divide it by 30 and get an estimation of the number of months.
If you need to truncate the decimals you could use Floor: Floor((LastDate-FirstDate)/30) and you'll get your 4 months
If LastDate-FirstDate doesn't work there could be an issue with the data type which is a different issue.
Hope this helps,
L
Hi Luis,
Its working thank you so much.
Best Regards,
Bing