04-18-2018 05:24 AM
I have two variables ID and Date. I need to get a max date value, tried everything but not able to find a way so please help me.
04-18-2018 06:55 AM - edited 04-18-2018 06:56 AM
What do you want to do more specific?
The easiest way is to add a list table and then sort in descending date order and look at the first row
04-18-2018 07:12 AM
My requirement is to calculate and create a data item which should contain the latest data i.e. 17 Jan 2018 in the given sample data.
That data item will be used in a button bar to highlight Data Refreshed On.
I hope, I am making sense here.
04-18-2018 11:23 AM - edited 04-18-2018 11:29 AM
Here is a previous discussion about max date in VA:
If you just want to display the max date in your report, you can use a rank to select the "top 1" date.
If you need to perform any calculations using the max date, you will need to create a column in your data query using the MAX() function.
Also in 8.2 or 7.4, you can display the timestamp of the most recent update to the data source in a Text object. (Search the doc for "Dynamic Text") But this is not necessarily the same thing as the max date in your data and I believe you cannot do any calculations with this value.
Let us know if this helps.
04-18-2018 11:24 AM
Create a new calculated item, use your date variabel and "treatAs" number. Set aggregation to max.
Add a button bar and set your date variabel as category, then rank and pick the highest 1 from your calculated variable.
This will make your button bar show only the highest date in your data.
04-18-2018 01:55 PM - edited 04-18-2018 01:56 PM
You can assign your date variable to the Category role of the button bar. It is not necessary to convert it to a category data type.