Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Multiple series with Dimensions instead of Expressions

Hi, I currently have a chart that shows this:

Capture.PNG

Dimensions:

Nothing

4 or n Expressions:

<$100k:     Count({<set expression...>} if(Div( Fees,10000)=0, N))

>$101-299:     Count({<set expression...>} if(Div( Fees,10000)=1, N))

>$300-499:     Count({<set expression...>} if(Div( Fees,10000)=2, N))

>$500k:     Count({<set expression...>} if(Div( Fees,10000)>=5, N))

However, it is extremely tedious to maintain if the formula changes or if I need to add in a new category.

Q. How do I re-create the above using Calculated Dimensions and with only 1 Expression?

3 Replies

Re: Multiple series with Dimensions instead of Expressions

Can this work for you?

Dimension : ValueList('<$100k', '>$101-299', '>$300-499', '>$500k')

Expression

If(ValueList('<$100k', '>$101-299', '>$300-499', '>$500k') = '<$100k',

Count({<set expression...>} if(Div( Fees,10000)=0, N)),

If(ValueList('<$100k', '>$101-299', '>$300-499', '>$500k') = '>$101-299',

Count({<set expression...>} if(Div( Fees,10000)=1, N)),

If(ValueList('<$100k', '>$101-299', '>$300-499', '>$500k') = '>$300-499',

Count({<set expression...>} if(Div( Fees,10000)=2, N)),

If(ValueList('<$100k', '>$101-299', '>$300-499', '>$500k') = '>$500k',

Count({<set expression...>} if(Div( Fees,10000)>=5, N))))))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Multiple series with Dimensions instead of Expressions

I think I will add on edit script add range of Fees and use intervalmatch()

if you need to change on UI

Dimension : Class(Fees,100000,'X') or subfield(Class(Fees,100000,'X'),' ',1) &' - '& subfield(Class(Fees,100000,'X'),' ',5)

Expression : Count({<set expression...>} Fees)

akarolewski
New Contributor III

Re: Multiple series with Dimensions instead of Expressions

1. Sometimes I use logarithm and its base as a parameter to be changed on the slide bar.

2. Similarly you can fix kind of threshold parameter like 1000 and use it as multiplying factor and bases to be multiplied:1,2,3,4,5 plus slider

3. You may add 4-5 slider that will indicate the end of one range and the beginning of following one