I have an analysis that does not work when at the dataset level, but works at the analysis level. This calculation works fine in other datasets and we’ve used it for a while, but does not seem to work in the version I’m working with at the dataset level.
The Data preview while editing the dataset shows the calculation working just fine, but when trying to use it in a visual, it will sum to 0. Data type is numeric and there are no null values present.
Neither solution has worked. I’ve added step calculations, and it still drops off at a certain point. Attempting to revise that calc has proved tough. No approaches are working at that step. We’ve opened a support ticket.
This test calc works fine, no issues.
ifelse({volume_unit} = “ml”, 1,{volume_unit} = “l”, 2,{volume_unit} = “us_g”, 3,{volume_unit} = “us_oz”,4,0)
This one still doesn’t work (along with several iterations of it)
ifelse({volume_unit} = “ml”, {order_volume}/1000,{volume_unit} = “l”, {order_volume},{volume_unit} = “us_g”, {order_volume}*3.785,{volume_unit} = “us_oz”,{order_volume}*0.02957353,0)/9
So to get it right. @duncan calculation works but it results in 0?
Is it possible that there are spaces in the volume_unit field ("ml " instead of “ml”)?
I agree with @ErikG, if that comes back as 0 that tells me that the field isn’t recognizing the value as written which would mean the values currently in your field don’t have the same string/character length.
It has been some time since we have heard from you but would still like to help you find a solution. If we do not hear from you in the next 3 business days this topic will be archived.
I was able to try the suggestions above. All suggestions reach the same result of null. We have a ticket open with AWS and they in turn created an internal ticket. It seems it’s a very particular issue going on, but not with the calculation itself.