I am receiving an error whenever I change from variance mode to custom mode. Testing on each item it seems to be the addition of the variance percentage that creates the error.
I’m not changing anything when switching to custom mode, we just want the columns in a different order, so I don’t understand why the data or the calculation would change.
I’m starting in variance mode and pulling in the specific data desired.
Hi @MatthewWalsh ,
One thing I would suggest, is look at the error logs under your name after you execute the query, this should shed light as to what the issue is. My gut feel is this will be a DIV/0 error. You can get around this by adjusting your code to have the following logic:
^{a}/nullif({b},0)
Using this code will inspect the divsor ({b}), if the number is 0 (which would cause div/0) we mark it as NULL and therefore it returns 0. If you want to do something else other than 0 then you can use a case statement. Have a look at this post where I document how you use SQL commands within Custom Mode.