Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
m4u
Partner - Creator II
Partner - Creator II

Another beginner's question

I am trying to make a simple debt aging chart.

I have a simple bar chart where the X axis is a calculated dimension - Today()-DueDate

The expression is Sum(LineTotal)

Basically, it shows me a bar for each possible value of the expression - which can be many values. I'd like to group those values into ranges - meaning to show 1 bar for all values for which the result the expression produces in between 0 and 30, another one for 31-60, 60-90 and 90+,

I know this can be done on the data loading level by adding a calculated field to the table itself... but can this be done as an expression of some sort, or another manipulation on the chart itself?

1 Solution

Accepted Solutions
Not applicable

you could use the class function if your range is constant

example : class ( dimX , 30 , 'Value' )

You can also use If ( better if your range is not constant)

If ( dimX < 30 , '< 30' , if (dimX < 60 , '30 to 60' , if(dimX < 90 , '60 to 90' ,' > 90')))

jj

View solution in original post

3 Replies
Not applicable

you could use the class function if your range is constant

example : class ( dimX , 30 , 'Value' )

You can also use If ( better if your range is not constant)

If ( dimX < 30 , '< 30' , if (dimX < 60 , '30 to 60' , if(dimX < 90 , '60 to 90' ,' > 90')))

jj

Not applicable

You can have the chart dimension calculated as

=Class((Today()-DueDate),30,'Days')

This will return the X-axis dimension value grouped as '0<=Days<30, 31<=Days<60 .... and so on.

Let me know if this works

Tarique

m4u
Partner - Creator II
Partner - Creator II
Author

Thanks guys