Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I'm trying to calculate the YTD by month and display in chart all the month of the year.
What i want to achieve is the YTD by month from all regions where region=responsibleRegion;
I've this expression as a dimension:
=if(GetSelectedCount(Month) > 0, Month, if(GetSelectedCount(Week)>0, Week , if(GetSelectedCount(Day)>0,Day,Month)))
And what i've try in expressions was:
=Sum({$<Responsible={RaiserPlantID}>} Auth*XRATE2USD) ;
=sum({$<Year = {$(vYearToday)}, Month = {"<=$(vMonthToday)"}>} if(Responsible=RaiserPlantID ,Auth*XRATE2USD, 0));
//=sum(if(RaiserPlantID=Responsible,Auth*XRATE2USD ,0))
But none of the above expressions get's the right values when i select dates.
PS: another thing is when no date is selected i calculate all until now , but when a date i selected is calculated until the date.
You'll have a hard time if you want to do this with expressions only. Somehow you need to calculate the YTD period for each month. That's easiest done with a helper table in the script. See this document for more information: Calculating rolling n-period totals, averages or other aggregations
I've read the files you mentioned but i've no clue how to accomplish
Fábio,
Podes compartilhar seu qvw para ajudarmos?
Abraços.
Desculpa Rogerio mas nao posso pois é da empresa onde trabalho e eles são muito restritos com a informação, vou tentar fazer uma copia com informação dummy.
Sorry Rogerio but i cant, it's for my company and they are very restricted sharing info, i will make a copy filled with dummy data so you and Gysbert Wassenaar cant take a look.
Thank You