Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to make a calculated measure into a dimension so that I can use it in a histogram.
Note I can't compute the new value in the load script, it has be done dynamically. That's because the calculation is based on a variable that the user can change from the dashboard.
I've tried doing the below as my dimension, but no success - "the chart is not displayed because it contains only undefined values"
Aggr(Avg(price * vVarModifier), item_ID)
Any help would be much appreciated.
Your expression looks correct.
So you need to do some debug work to find the problem, e.g.:
I removed the variable, just to make sure it wasn't an issue with using a variable.
With no variables, the histogram returns the same. A KPI returns nothing ('-'), but a filter returns my values correctly. So my expression does return correctly a list of integers, as I expect. Not sure where to go from here. Any ideas?
EDIT:
One interesting I have noticed is if I create a filter with Aggr(Sum(price * qty),item_ID), the frequency count on the filter doesn't work, it shows all as '-'. But if I use in the filter (price * qty), the frequency count does work. Ultimately I need to perform the first calculation though. Not sure if that provides any hints as to what is going on.
Are you using a histogram or a bar chart? They are quite different... If you use a bar chart, then what do you use as a measure?
Aggr() can be used as a dimension, but if you use it as a measure, you should wrap it in an aggregation function, like Sum(Aggr(...)).
I'm using a histogram.
I can sort of replicate what I'm trying to achieve on a bar graph, using CLASS and AGGR as a dimension and COUNT the ids as a measure.
However, I can't use the barchart because the labeling doesn't scale like it does for the histogram object, and I need my histogram object to be small. Also, the barchart shows buckets created by the class function, not the raw number on the label (while histograms do show that number and the buckets adjust dynamically).
See images below to see why I need a histogram, not a barchart. On the left is a barchart, on the right a histogram.
Could be a bug. We'll look into it.
Hello! Just curious if you had a chance to look at this - or understand what is going wrong here?
Thanks