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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Anil_Babu_Samineni

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))))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
inoruoya
Partner - Contributor III
Partner - Contributor III

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)

Anonymous
Not applicable
Author

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