Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I'm trying to compare Prior Year and Current year, so what I'm doing is grabbing the current [Year Month] selection, subtracting it by 100
and using set analysis to force it onto the expression:
=num(sum({<[Year Month] = {$(=v_MaxYearMonth-100)}, [Type] = {'P'}>}[Count]),'#,##0')
I have set as v_MaxYearMonth =Max({1}[Year Month])
I verified that v_MaxYearMonth works, but the sum expression does not for all [Year Month] selections, it returns the sum only if the selection is 201305 (which incidentally is this 201405 - 100), but returns 0 otherwise
Maybe I'm missing something obvious, but I've been pondering on this for hours, and I got nothing...
Any ideas?!
BINGO!!! you got it!!! thank you Jagan Mohan
FYI: I just set the Year to -1 as per your first suggestion