Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to compare the current month with the previous month.
The result is build up from a Pick Match, where the master items T1A etc are the KPI calculations with there own calculations with set analysis in it.
Current month:
{<_YearMonth_serial = {"$(=Max(_YearMonth_serial))"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C)
Previous month:
{<_YearMonth_serial = {"$(=Max(_YearMonth_serial)-1)"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C)
The result is het sum [Current month] - [Previous month] by combining both statement as 1 measure like this:
{<_YearMonth_serial = {"$(=Max(_YearMonth_serial))"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C)
- (minus)
{<_YearMonth_serial = {"$(=Max(_YearMonth_serial)-1)"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C)
This does not work because it are 2 different outer set operators. At least, I have not found a way to make it work.
Do yo have solution? Thanks
I'm not entirely sure what the issue here is, but have you tried using:
RangeSum({<_YearMonth_serial = {"$(=Max(_YearMonth_serial))"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C) , -{<_YearMonth_serial = {"$(=Max(_YearMonth_serial)-1)"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C))
I'm not entirely sure what the issue here is, but have you tried using:
RangeSum({<_YearMonth_serial = {"$(=Max(_YearMonth_serial))"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C) , -{<_YearMonth_serial = {"$(=Max(_YearMonth_serial)-1)"}>} Pick(Match('$(T1orT2)', 'T1','T2','T2_S1'), T1A, T2A, T2C))