Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, below is quite a complex expression that basically works out if two measure are increasing and if so does the calculation. It is using Max Year and Max Year -1 as I want to compare to previous year.
IF(Sum(Aggr(Avg({<YEARCALC={"$(=Max(YEARCALC))"}>}[Number attended]),EventID,PREVINSTNAME)) > Sum(Aggr(Avg({<YEARCALC={"$(=Max(YEARCALC)-1)"}>}[Number attended]),EventID,PREVINSTNAME)) AND
(Sum(Aggr(Avg({$<Enrolled={1},YEARCALC={"$(=Max(YEARCALC))"}>}FPE),SUBJECTAREA,INSTANCEKEY)) /
Sum(Aggr(Avg({$<YEARCALC={"$(=Max(YEARCALC))"}>}FPE),SUBJECTAREA,INSTANCEKEY))) - (Sum(Aggr(Avg({$<Enrolled={1},YEARCALC={"$(=Max(YEARCALC)-1)"}>}FPE),SUBJECTAREA,INSTANCEKEY)) /
Sum(Aggr(Avg({$<YEARCALC={"$(=Max(YEARCALC)-1)"}>}FPE),SUBJECTAREA,INSTANCEKEY))) > 0,(Sum(Aggr(Avg({$<Enrolled={1},YEARCALC={"$(=Max(YEARCALC))"}>}FPE),SUBJECTAREA,INSTANCEKEY)) /
Sum(Aggr(Avg({$<YEARCALC={"$(=Max(YEARCALC))"}>}FPE),SUBJECTAREA,INSTANCEKEY))) - (Sum(Aggr(Avg({$<Enrolled={1},YEARCALC={"$(=Max(YEARCALC)-1)"}>}FPE),SUBJECTAREA,INSTANCEKEY)) /
Sum(Aggr(Avg({$<YEARCALC={"$(=Max(YEARCALC)-1)"}>}FPE),SUBJECTAREA,INSTANCEKEY))),'')
However when I add to Table as below, it comes back blank as the end of the expression, but I know it works when ive tested it in an object. It is something to do with having Year as a dimension but i'm not sure what.
YEAR YEARCALC Example A Expression Above
2013/14 2014 ABC
2014/15 2015 DEF
2015/16 2016 GHI
Any help would be appreciated
Hi Young,
Can yo add sample application here? This help's to understand the problem easily.
Thanks,
Venkata Sreekanth
Does it work when you remove YEAR and YEARCALC as dimensions? I think you might need to use Above() function instead of set analysis to make this work