Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone please help me figure out how to get rid of this IF statement in the beginning of my SET analysis?
This script works fine and returns the correct values:
=if(MonthYear= date($(=max(MonthYear)),'MMM-YYYY'),
sum({$<
CheckYear = {$(=Max(CheckYear))},
PrimaryPositionYN={1},
EarningsHistoryYN -= {1},
NonCashYN = {0}
>}
[Current Earnings])
)
Any help would be appreciated.
Hi,
It depends what kind dimension you are using, If you are using MonthYear as Dimension also then you have to use that if statement .
If you are not using as dimension then
try
sum({$<
MonthYear={"$(=date(max(MonthYear),'MMM-YYYY'))"}
CheckYear = {$(=Max(CheckYear))},
PrimaryPositionYN={1},
EarningsHistoryYN -= {1},
NonCashYN = {0}
>}
[Current Earnings])
Regards
Do you want calculate Sum for all MonthYear? Then try this
sum({$<
CheckYear = {$(=Max(CheckYear))},
PrimaryPositionYN={1},
EarningsHistoryYN -= {1},
NonCashYN = {0}
>}
[Current Earnings])
Hi,
It depends what kind dimension you are using, If you are using MonthYear as Dimension also then you have to use that if statement .
If you are not using as dimension then
try
sum({$<
MonthYear={"$(=date(max(MonthYear),'MMM-YYYY'))"}
CheckYear = {$(=Max(CheckYear))},
PrimaryPositionYN={1},
EarningsHistoryYN -= {1},
NonCashYN = {0}
>}
[Current Earnings])
Regards