Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
What's wrong with this formula?
I am getting the error "Error in set modifier expression":
Sum({<([A]-[B])={">-6<1"}, [Year]={$(=max([Year]))}>}
FABS([A]-[B]))
Many thanks
Tom
A condition within the set analysis must be done always against fields and not against a calculation. In your case you could change it in this way:
Sum({<[AnyRelevantID]={"=match([A]-[B], -5,-4,-3,-2,-1,0)>0"}, [Year]={$(=max([Year]))}>}
FABS([A]-[B]))
which is quite the same like:
if([A]-[B] >-6 and [A]-[B] <1, Sum({< [Year]={$(=max([Year]))}>} FABS([A]-[B])))
If you want to use a real set analysis you need to do this within the script:
[A]-[B] as [A-B]
and then:
Sum({<[A-B]={">-6<1"}, [Year]={$(=max([Year]))}>} FABS([A-B]))
- Marcus