Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to sum the distance traveled on weekends for the last period (BaseMonth ). Because it is a common calendar, the last BaseMonth is actually December but my DateType 'Movement' is in July (BaseMonth 24235). When I select DateType 'Movement' and Weekends flag '1' the answer is correct. When I create the expression with Set Analysis, it gives zero as the result. Expressions I have tried are,
"sum({<DateType={'Movement'},Weekends={'1'},[_BaseMonth]={"$(=max([_BaseMonth]))"}>}Distance)" or
"sum({<DateType={'Movement'},Weekends={'1'},[_BaseMonth]={'$(=max([_BaseMonth]))'}>}Distance)" but no success. The snippets show when making selections, the results are correct, but in the set analysis it does not give correct result.
Please can you let me know where I am doing something wrong.
May be this
Sum({<DateType = {'Movement'}, Weekends = {'1'}, [_BaseMonth] = {'$(=MaxString([_BaseMonth]))'}>} Distance)
Hi Sunny,
Thanks, I have used this expression. It still only returns the result when I select either the Movement or weekend flag.
As part of the testing, if I select the year 2019 and in a seperate text box I have this expression: "firstsortedvalue({<[Year]={'$(=max([Year]))'},DateType={'Movement'},Weekends={'1'} >} [_BaseMonth], -Tx_Date)". It returns the correct BaseMonth. I am wondering if there is a way of using this logic in the [_BaseMonth] logic?
Thanks again for the help.