I am not sure this will work - it requires that the first formula returns "undefined" when @"[30]" is not present.

Try this: sum(@"[12]":@"[30]", 0, m1, sum(@"[12]":@"[27]", 0, m1))

Notice that the formula syntax now contains four entries. The fourth entry could be a fixed number, e.g. "0", or as in this case a new formula. The fourth entry comes into action when the first part returns "undefined".

PS: If @"[27]" returns undefined as well you can of course add a fourth entry to that part of the formula syntax and so on.

I have tested a little on a simular situation in demodata and believe there is a "nerdy" explanation as well as a solution.

The problem is that Not defined seems to have two different meanings within the client.If you reference a scope like sum(@"[12]":@"[30]", 0, m1) it will return Not defined when the scope @"[12]":@"[30]" is completely or partly missing but the 4th parameter will not be activated.

However if you reference just one dimension value like @"[30]" - could be in a formula like this: sum(@"[30]",0,m1,1) - the 4th parameter (in this case the value 1) will be returned if the dimension value isn't there.

By creating this formula we have actually set a flag stating @"[30]" is missing - now we can make a conditional calculation like this:if sum(c1,0,m1) = 1 then sum(@"[12]":@"[27]", 0, m1) else sum(@"[12]":@"[30]", 0, m1)

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

We use cookies to improve your site experience, but they also provide us with information on your use of our website.
To find out more about the cookies we use and how to delete them, see our Privacy Policy. By continuing to browse the site, you are consenting to our use of cookies.