Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need help with my code which is as follows. I need to change 2019 and Oct so that it is not hard coded so that I will not have to go in every month to change the code. Thanks
Sum({$<[Work Date.autoCalendar.Year] = {'2019'}
,[Work Date.autoCalendar.Month] = {'Oct'}
,[IS.Activity Type] = {[Enhancing]}
,[Supported Location] =- {'04'}>}Hours)
i hope this works
Sum({$<[Work Date.autoCalendar.Year] = {'$(=year(today()))'}
,[Work Date.autoCalendar.Month] = {'$(=month(AddMonths(Today(),-1)))'}
,[IS.Activity Type] = {[Enhancing]}
,[Supported Location] =- {'04'}>}Hours)
and it should works to be honest hh
you can change 2019 with $(=year(today()))
and the month -1 with $(=month(today())-1)
Thanks for the response but it does not work
to check whether your expression is fine or not, try to put it in text object
My code works alright but I want to make it dynamic. I do not want it hard coded like it is so that I do not have to go in each month to make changes. The suggestions above do not work. any other suggestions will be appreciated
can you attach the QVW file ?
Sorry its sensitive data not allowed to share
i hope this works
Sum({$<[Work Date.autoCalendar.Year] = {'$(=year(today()))'}
,[Work Date.autoCalendar.Month] = {'$(=month(AddMonths(Today(),-1)))'}
,[IS.Activity Type] = {[Enhancing]}
,[Supported Location] =- {'04'}>}Hours)
and it should works to be honest hh
Thank you the code worked. But I have one more worry. Since my chart is supposed to show metrics for previous month how do I tweak the code to show metrics for December 2019 when we are in January 2020?
there will be no problem since the function addmonth(today(),-1) will return 1/12/2019 when it is on 1/1/2020
so there's no problem