I have a problem with creating a bucketed column in my table in Qlik Sense. After the bucketing didn't work in the dimension editor, I went into the data manager, loaded the tables and configured 11 buckets containing values between roughly -100 and +8,000,000,000. Configuration worked great, only when I want to "publish" the column, a window pops up titled "Devhub.ErrorDialog.Title" saying "Invalid Params" and I can't find the column anywhere in the sheet editor. I've tried googling the problem, but even Google just returns 5 search results that don't get me anywhere. With all my other charts, the bucket configuration via dimension editor worked perfectly (and I used the exact same syntax), so I don't know what could be the problem there.
They are clearly not the same. The 2nd script is a different field and the values and ranges are different.
That being said did you try to copy the 2nd one into a new app and just try to see if it works? If it does, then there is something corrupt in your original app. If it still doesn't work then there is something wrong with what you are trying to do.
In the example that works you have 11 Ifs and 10 ) at the end. In the 2nd example you have 9 Ifs and 9 ) at the end.