jjmontesl / cubesviewer

Explore and visualize analytical datasets
http://www.cubesviewer.com
Other
441 stars 112 forks source link

Fix Wrong Measure Param #83

Closed russelmahmud closed 6 years ago

russelmahmud commented 8 years ago

Backend expects aggregates parameter for measure selection, but cubesviwer misses that and mistakenly uses measure for that.

jjmontesl commented 8 years ago

Are you sure about this? Check https://pythonhosted.org/cubes/server.html#aggregate, measures are not exactly the same as aggregates.

CubesViewer requests all aggregates for a measure, although it's true it's not the best practice. From Cubes:

You can specify either aggregates or measures. aggregates is a concrete list of computed values. measures yields their respective aggregates. For example: measures=amount might yield amount_sum and amount_avg if defined in the model. Use of aggregates is preferred, as it is more explicit and the result is well defined.

Why do you need to select a particular aggregate for the query? Is it for performance reasons?

russelmahmud commented 8 years ago

Hey @jjmontesl, I had 2 measures, each one calculation is different than other one. Previously changing measure didn't call backend for new calculation, it would show wrong data from cache.

But i am not sure whether we should face it by "measure" or "aggregate" param. In my case changing "aggregate" works for me.