Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar Chart with Custom Ranges

Hello All,

I am struggling with creating the necessary calculated dimension / expression to create a bar chart with custom ranges.  Please see my data set below

Trade IDAmount in EUR
56465461€ 23,000.00
564894€ 51,500.00
5616516€ 100,000.00
4894198494€ 123,000.00
8165161€ 890.00
984194€ 12,312,323.00
5615618€ 590.00

I am trying to create the bar chart showing the # of trades that fall into the following buckets while using an "if Statement":

Amount in EUR - Buckets
0 - 25,000
25,000 - 50,000
50,000 - 100,000
100,000-200,000
200,000 +

Each Trade ID is unique.  Please help or my keyboard gets thrown across the room!

3 Replies
MayilVahanan

Hi

Try like this,

In script ,

Load *, if(Amount in EUR >= 0 and Amount in EUR <= 25000,'0-25000', if(Amount in EUR <= 50000,'25000-50000',

if(Amount in EUR <=100000,'50000-100000',if(Amount in EUR <= 200000, '100000-200000','200000+')))) as Bucket from tablename;

Then use Bucket as dimension, and count(Trade ID) as Exp

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

I agree that should work, but I am also trying to understand how to do this through using "if statements".  I believe I will need to create a custom dimension, but I am having trouble with getting getting started in the right direction...

any ideas?

MayilVahanan

Hi

Please see the attached file..

Sheet name: Bucket

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.