Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reagarding Max(date) and Total communication (YearTD)

Hi,

I'm unable to use Max(date) on timestamp date column, where i need to pick the max(date) of the user and need to find his (Total YTD) communication.

I have 4 Columns in my report, Date, CustomerName, Communication type.

This interaction will happen on the map, when I click on CustomerName in the map Then i need to show his related data in the table view with ( his Last Max(date) which is a timestamp column, his Name, and his total interaction YTD ) into a single row.

I'm not able to run Max(date) on that date col and not able to calc YTD interactions.

9 Replies
sunny_talwar

Not sure I understand? What expression are you using which isn't working?

Anonymous
Not applicable
Author

Max(date) throwing error.

sunny_talwar

What error does it throw?

Anonymous
Not applicable
Author

max(date) giving error, bec i found that date stored in the DB is timestamp. Resolved now by using below one

Date(Floor(Timestamp#(MAX([comm_Date])))).

How to find YTD need help on YTD calcs with specify user selection.

sunny_talwar

Usually you can do this

{<Date = {"$(='>=' & Date(YearStart(Max(Date))) & '<=' & Date(Max(Date)))"}>}

Anonymous
Not applicable
Author

Sunny, Thanks for the response.

That wil give the YTD count ?, bec I'm able to find the Maxdate by using Date(Floor(Timestamp#(MAX([comm_Date])))).

But i didnt have any Master Calendar Created. Need to calcuate YTD based on avaiable Date column with specific to his Name, Communication type.

sunny_talwar

Change this in the script

Date(Floor(Timestamp#([comm_Date]))) as DateField

and not use DateField in your set analysis

Anonymous
Not applicable
Author

Sunny,

In my DB the comm_date showing data: 2017-01-02 05:00:00

When I import the table into Qliksense,the data I'm seeing for 2017-01-02 05:00:00 is 42737.208333333. in Datamodel Viewer, when i pull the data in the table report its showing 1/2/2017  5:00:00 AM.


unable to apply the Date(Floor(Timestamp#([comm_Date]))) as DateField comm_date its giving null.



sunny_talwar

How about this?

Date(Floor(comm_Date)) as DateField?