Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bharani8
Creator III
Creator III

Max Date from each month should appear in my List box

Hi Experts - Kindly find my qvw file.. I have date field ... What i need is.. I need a list box in which it should show only the last date of each month... and that should be converted to a Month name...

Eg., in Aug if we have 29th Aug 2017, 30th Aug 2017, 31st Aug 2017... in my list box it should show only 31st Aug and it should appear as Aug-2017

36 Replies
tresesco
MVP
MVP

Are you sure that you are using all the date fields (in the expression) from the same table?

bharani8
Creator III
Creator III
Author

Yep... All are from one table

tresesco
MVP
MVP

Refer the link I posted above and see if you can share your sample qvw, so that I can have a look into and investigate.

bharani8
Creator III
Creator III
Author

I will give you shortly on the file that i use with date column alone... May be u can try with that.. Gimme 2 mins

bharani8
Creator III
Creator III
Author

This is the date file that i use...

tresesco
MVP
MVP

I have already used this field and showed you working solution. It could potentially be something else in your data model (other fields, like [As Of Date] field association or so). If you are worried about the data, scramble those fields and share qvw.

bharani8
Creator III
Creator III
Author

Hi Treseco - After applying your logic in the attached qvw ... i see only one month... Plz chk this.. If u can get the solution here, i believe it will work in my dashboard as well Appreciate your patience..

Note: i have different years as well in this data.. Starting 2014 till 2017

tresesco
MVP
MVP

Put a NODISTINCT in the aggr(), like:

=MonthName(if(YDAY=Aggr( NODISTINCT Max(YDAY),Month_Name),YDAY))

bharani8
Creator III
Creator III
Author

I see only years starting from 2016(Partial) and 2017.. rest all not to be seen...

Capture123.PNG

tresesco
MVP
MVP

If you need year-wise-month-wise result, you have to create year field in the script and use that in aggr() too, like:

=MonthName(if(YDAY=Aggr( NODISTINCT Max(YDAY),Month_Name, Year),YDAY))