Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to get the max value within a period (YTD & QTD) for a field, where I have a moving start of year defined by a user input so it will not be the 1st of Jan. I don't appear to be getting expected values with my command below
=max(if(InYearToDate(DateRecorded,today(1),0,0),Reading)) retrieves the right ytd values assuming a Jan start of year.
=max(if(InYearToDate(DateRecorded,today(1),0,7),Reading)) I've tried putting first month of year as 7 for July so that I should a different value in my table, but I'm getting the same value as the expression above.
Any ideas?
Thanks
Steve
hi,
Can you please attach any image or sample data which will show correct answer which you want.
Thanks,
Ashutosh
Hi Steve,
If you want to get the max value in July 2013, then try this expression
=Max({<DateRecorded={'>=$(=MonthStart(MakeDate(2013, 7)))<=$(=MonthEnd(MakeDate(2013, 7)))'}>} Reading)
Hope this helps you.
Regards,
Jagan.
Hi Steve
You need
=max({<DateRecorded={">=$(vYrStart)"}>} Reading)
This will return the maximum reading for all dates >= the variable vYrStart, where vYrStart is set as the date by your users (you could have them set it in a slider object if you want.
Give me a shout if it doesnt work
Erica
Hi All,
Thanks for the help thus far, but none thus far answer my question really.
I want to be able to use YTD & QTD in the functions inXXXtodate so that I can easily pick out previous and future time periods. My understanding of the function is from the Ref Manual.
InQuarterToDate (date, basedate , shift [, first_month_of_year =1])
So I am not sure why I can get a year to date or quarter to date figure with a start of year for July. I want my YTD 7 to show 3200 from the above table assuming my start of year was in July?
Does that make sense?
Thanks
Steve
Hi All,
I've added a better definition of what I am after which may help with the understanding.
Thanks
Steve