Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to get max date for specific type of data, but I'm having a bit difficulties to get it work when the max function is inside set analysis. I'm trying to get max date only for TYPE Invoice, since type budget is messing up actual max dates. Can someone help me find what the issue with my code:
Sum({< YearMonth = {'>=$($(vCompare2))<=$(=Max({$<TYPE={'Invoice'}>}YearMonth))'}, Year=, MonthName=, Month=, Quarter=, Week= >} $(vGrossSales))
The part {$<TYPE={"Invoice"}>} is what I'm trying to add, but it seems to ignore type of the date, so there must be something wrong with my code?
I am thinking its this part of the set analysis which might not be working:
Sum({<YearMonth = {">=$($(vCompare2))"}, Year=, MonthName=, Month=, Quarter=, Week= >} $(vGrossSales))
Can you check if this is working or not?
Try with doube quotes:
Sum({< YearMonth = {">=$($(vCompare2))<=$(=Max({$<TYPE {'Invoice'}>}YearMonth))"}, Year=, MonthName=, Month=, Quarter=, Week= >} $(vGrossSales))
Unfortunately that doesn't work !either, it now looks following:
Sum({<YearMonth = {">=$($(vCompare2))<=$(=Max({$<TYPE={'Invoice'}>}YearMonth))"},
Year=, MonthName=, Month=, Quarter=, Week= >} $(vGrossSales))
This gives me correct YearMonth, so the problem must be with set analysis:
=Max({<TYPE={'Invoice'}>}YearMonth)
I am thinking its this part of the set analysis which might not be working:
Sum({<YearMonth = {">=$($(vCompare2))"}, Year=, MonthName=, Month=, Quarter=, Week= >} $(vGrossSales))
Can you check if this is working or not?
Thank you, that was it, taking budgets into account.