Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ireche
Contributor

ValueLoop dimension labels on barchart

Hi,

I have a bar chart with:

-Dimension = ValueLoop(0,4800000,100000)

- Expression = sum(if(aggr(nodistinct sum(Values), Dimension)>=ValueLoop(0,4800000,Step) and aggr(nodistinct sum(Values),Dimension)<(ValueLoop(0,4800000,Step)+Step), 1 ,0))

The expression sums the number of times sum(Values) falls within that particular range. This works fine and I get something like this:

ireche_0-1639993321696.png

I would like to see the labels of the x-axis as something like:

0-100000, 100000-200000, 200000-300000, etc.

I have tried with changing the dimension to

 =text(ValueLoop(0,4800000,100000))&'-'&text(ValueLoop(0,4800000,100000)+100000)

and also:

Class(ValueLoop(0,4800000,100000),100000)

but they all give me 'Dimension not valid'.

I would appreciate any help or ideas on this 🙂 Thanks a lot!

 

Labels (1)
2 Replies
anat
Master

ireche
Contributor
Author

Thank you. I have already tried with the solution proposed in that thread. The problem I have with it is that I need all ranges to show, even the ones with no values, which the class function doesn't create. See, here, for example, 1600000, 1900000 and 2000000 are missing:

ireche_0-1640078070827.png

Dimension is: aggr(class(sum(Values), Step), Dimension)

Measure is: count(distinct Dimension)

Do you have any idea on how I could force the empty ranges to show?

Thanks!