Discussion Board for collaboration related to Creating Analytics for QlikView.
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 :
but it doesn't work, Can you help me?
Thanks in advance.
Try to use Calculated dimension =if(Date=max(total Date),Date).
And check Suppress When Value Is Null
Here, it's only retrieve the last action. I'd want the last action per account, any idea? The equivalent in SQL :
GROUP BY ACCOUNT, ACTION
So, where is the problem? This SQL query looks OK. What is the result of it? And which graphic you want to create?
My Last SQL is my objective.
issue you gave me would be the equivalent SQL :
WHERE DATE = (SELECT MAX(DATE) from TABLE)
... which is not my requirement.
I've tested your first SQL. It works. You said that MAX(DATE) doesn't work. Where? In the script or in the object?
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.