Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
How do I do two different calculations within the same expression depending on the value in a field?
I have tried with the calculation below, but it does not work
If( Source = {'Maintenance'}, Sum([Target], Sum(Aggr(Sum(Target) / Count (distinct SC_ID),YearMonth,[Target Component Group],ID)) )
My True and False statements works fine seperately, but not when I am trying to combine it in an IF Statement.
Best regards,
Thomas
There is a missing bracket by the first sum(Target) and if-check has a wrong syntax:
If( Source = 'Maintenance', Sum([Target]), Sum(Aggr(Sum(Target) / Count (distinct SC_ID),YearMonth,[Target Component Group],ID)) )
- Marcus
Hi Thomas,
Try
If( Source = 'Maintenance', Sum([Target]), Sum(Aggr(Sum(Target) / Count (distinct SC_ID),YearMonth,[Target Component Group],ID)) )
Beat me to it Marcus