Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have been struggling with trying to exclude the current month from a line chart if I use this it works fine but it is hard coded and I want to do this dynamically so I do not have to update the chart every month.
Sum({$<Date={'<=8/31/2017'}>}AvgSessionDuration*Sessions)/3600
However if I try something along these lines it does not seem to work, I know I am missing something simple
Sum({$<Date={'<=Inmonth(Date,today(),-1)'}>}AvgSessionDuration*Sessions)/3600
Any help would be much appreciated
Hi Brian,
may be
Sum({$<Date={'<=$(=MonthEnd(Today(),-1))'}>} AvgSessionDuration*Sessions)/3600
Regards,
Antonio
Hi Brian,
may be
Sum({$<Date={'<=$(=MonthEnd(Today(),-1))'}>} AvgSessionDuration*Sessions)/3600
Regards,
Antonio
No it does not display any data same as the one I posted, I know the problem lies in this area '<=Inmonth(Date,today(),-1)' of the expression but I just can not figure it out. MonthEnd was a good try though. If I could just figure out how to automate this little piece '<=8/31/2017'
If I change your expression to Sum({$<Date={'<=$(MonthEnd(Today(),-1))'}>} AvgSessionDuration*Sessions)/3600 it displays data but does not exclude the month of September (I removed the = in front of MonthEnd)
I appreciate the help Antonio been working on this for about a week and my boss just does not like the partial month showing in his reports he briefs
Can You share Your sample data ?
Sure how do I do that?
I need to run to do an errand but will be back if it helps I can attach the application.
Antonio thanks for your help something in your post made me look closer at date formatting and your original worked when I tweaked it as follows for my instance
Sum({$<Date={'<=$(=Date(MonthEnd(Today(),-1),'M/D/YYYY'))'}>} AvgSessionDuration*Sessions)/3600
I had two different date formats so my choice was to reformat one of the two conflicting formats or change to a number in this case I chose to change the format.
I'm glad to have helped You.
Regards,
Antonio