DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

Using negative values in slicer cuts #458

Closed schwab closed 6 years ago

schwab commented 6 years ago

In python cubes version 1.1, we have a numeric field with both positive and negative values. In slicer an aggregate cut like "aggregate?cut=patient@weight:0-177.8" works fine, but how can we filter for negative values? A cut like "aggregate?cut=patient@weight:-1-10" fails with

"error": "unknown_user_error", "message": "Unknown cut format (check that keys consist only of alphanumeric characters and underscore): -1-10" }

Is there anyway around this issue?

schwab commented 6 years ago

I found a closed issue for this same thing.... solution was to delimit the "-" with a "\" as in "\-1-10" etc.