Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate SUM of categories for YTD which should be the default calculation value when the user opens the Qv application.
For that i doing the following steps:
1. i have a trigger defined when the application open to set and selected the Max year of Date.
2. then I using this expression to calcultate the the SUM of categories for YTD, but is not working:
=Sum({<Date={'$(=max(Date))'},[YTD Flag]={1}>} NrCategories)
The YTD flag is being calculated with the following condition: if(Year2Date([$(vDateFieldName)], 0, 1, $(vToday)),1)
3.then i also need, to add in the same expression a condition to show the total SUM of the dates selected by the user.
For example, the application starts and the expression should give the sum of YTD by default. Then if the user selects 2015 and 2016 the expression should give the sum of the two Years, the same for months and/or quarters.
Any suggestions or ideas that help me move forward?
Many Thanks
Paulo
Can you try this:
Date(MakeDate(YEAR(DataSubmissao), MONTH(DataSubmissao), DAY(DataSubmissao))) as DataSubmissao
and this expression:
=Sum({<Date = {"$(='<=' & Date(Max(Date)))"}, [YTD Flag] = {1}>} NrCategories)
Hi Sunny,
I think now is OK. Is show me the correct values.
Thanks
Paulo