- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max(Date) on Graphic
Hi,
I'm new to Qlikview and try to do one thing creating a graphic - simple table
With such records :
account, action, date
I want to retrieve only the last actions by account (using max(date)). So I use expression :
Max ([Date])
but it doesn't work, Can you help me?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try to use Calculated dimension =if(Date=max(total Date),Date).
And check Suppress When Value Is Null
BR,
Konstantins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Konstantins.
Here, it's only retrieve the last action. I'd want the last action per account, any idea? The equivalent in SQL :
SELECT ACCOUNT,
ACTION,
MAX (DATE)
FROM TABLE
GROUP BY ACCOUNT, ACTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, where is the problem? This SQL query looks OK. What is the result of it? And which graphic you want to create?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My Last SQL is my objective.
issue you gave me would be the equivalent SQL :
SELECT ACCOUNT,
ACTION,
DATE
FROM TABLE
WHERE DATE = (SELECT MAX(DATE) from TABLE)
... which is not my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tested your first SQL. It works. You said that MAX(DATE) doesn't work. Where? In the script or in the object?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The good practice is to read all the data and to show in the object (to calculate) only necessary in this object.
In your case I would recommend to read from SQL all records. Then in the object use calculated dimension as I mentioned in my 1st post.
BR,
Konstantins