Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The calculation below is not working,The if conditions are not getting satisfied. Please help
=IF(MATCH(FC.DATE_FISCAL_MONTH_NUM_LONG,3,6,9,12)>0 and Type='P',
SUM({<FC.DATE_FISCAL_YEAR_LONG={$(vCurrentYear)},FC.DATE_FISCAL_MONTH_NUM_LONG={">=$(vPrevMonth)<=$(vCurrentMonth)"}>}([Direct Hours]/200)),
SUM({<FC.DATE_FISCAL_YEAR_LONG={$(vCurrentYear)},FC.DATE_FISCAL_MONTH_NUM_LONG={">=$(vPrevMonth)<=$(vCurrentMonth)"}>}([Direct Hours]/160))
)
try
=IF(MATCH(FC.DATE_FISCAL_MONTH_NUM_LONG,3,6,9,12)>0 and Type='P',
SUM({<FC.DATE_FISCAL_YEAR_LONG={'$(vCurrentYear)'},FC.DATE_FISCAL_MONTH_NUM_LONG={">=$(vPrevMonth)<=$(vCurrentMonth)"}>}([Direct Hours]/200)),
SUM({<FC.DATE_FISCAL_YEAR_LONG={'$(vCurrentYear)'},FC.DATE_FISCAL_MONTH_NUM_LONG={">=$(vPrevMonth)<=$(vCurrentMonth)"}>}([Direct Hours]/160))
)
its giving me the same numbers, The set analysis i made for Year and Quarter are working but for Curr month
Vs Prev month, this is coming wrong
What is your variable definition for the above mentioned variables?
Current Month:
=Max(IF(FC.DATE_FISCAL_YEAR_LONG=$(vCurrentYear),FC.DATE_FISCAL_MONTH_NUM_LONG))
PrevMonth:
=if($(vCurrentMonth)=1,12,$(vCurrentMonth) -1)
If the Month is multiple of 3(like 3,6,9,12) then I need to divide the direct hours by 200 else by 160
And, what is the value of FC.DATE_FISCAL_MONTH_NUM_LONG at time and point of calculation? Is it defined?
Yes it defined contains number(1,2,3..12)
OK, I have to clarify my question...
If you use your expression in a chart where this field is an dimension, the match() function should work. To make sure, just add it as an additional dimension. If you use it in any other way, and multiple values are selected (or available) in this field, match returns null. So "if" condition returns false.
So how you want me to modify this one. Please help me.if you want I can share the sample file with you
Just upload the file, and I (or anybody else) will take a look.