Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to write an expression that will return the prior month based on user filter selection.
So, the filter is Date field. The expression itself works, however when I try to add logic to retrieve prior month it returns 0.
Any help on what I am missing?
Thank you!
Marissa
Sum({$<Date = {"$(=AddMonths( Date, -1))"}>} (earned_hours)/(((number_of_business_days) - (actual_fte_outofoffice)) * ((actual_fte_factor_per_month)) * 5))
Hi @Marissa23
Can you try the below?
LET vPriorMonth = AddMonths( Date, -1);
Sum({$<Date = {"$(vPriorMonth)"}>} earned_hours / (((number_of_business_days) - (actual_fte_outofoffice)) * ((actual_fte_factor_per_month)) * 5))
I have used a variable to store the prior month's date and then use that variable in set analysis. Hopefully this works.