Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! Register today and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

Inline Table Band Range

hi

I have

IDDateAmount
ID121/10/201623242
ID225/10/20163423
ID326/10/2016

234324

ID430/10/2016124334
ID501/11/2016213
ID603/11/201621321
ID704/11/2016232
ID810/11/201674632
ID915/11/201643222

I want to get out put.

RangeCount
00
>100 and <10002
>1000 and <100001
>10000 and <500003
>500002
7 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try:

Load

         if(Amount = 0 ,'0'

             if(Amount >100 and Amount < 1000, '>100 and <1000',

                  if(Amount >1000 and Amount <10000, '>1000 and <10000',

                         if(Amount >10000 and Amount <50000 ,'>10000 and <50000',

                                   if(Amount >50000,'>50000' ))))) as Range,

              Count (ID) as Count

From Table

Group by Amount;

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

data:
LOAD * INLINE [
ID, DATE, AMOUNT
ID1,21/10/2016,23242
ID2,25/10/2016,3423
ID3,26/10/2016,234324
ID4,30/10/2016,124334
ID5,01/11/2016,213
ID6,03/11/2016,21321
ID7,04/11/2016,232
ID8,10/11/2016,74632
ID9,15/11/2016,43222

]
;

int_:
LOAD * INLINE [
min, max, inter
0, 100, 0
101, 1000, > 100 and <1000
1001, 10000, > 1000 and <10000
10001, 50000, > 10000 and <50000
50001, 99999999999999999999, >50000
]
;

Join(data)
IntervalMatch(AMOUNT)
LOAD
min,
max
Resident int_
;

Join(data)
LOAD
*
Resident int_
;

DROP Table int_;

Help users find answers! Don't forget to mark a solution that worked for you!
saumyashah90
Specialist
Specialist
Author

Hi People,

I want that solution on UI

.Cant change script at this position

shraddha_g
Partner - Master III
Partner - Master III

Try

Valuelist('0','>100 and <1000', '>1000 and <10000','>10000 and <50000','>50000') in Dimension

In Measure

Pick(Wildmatch(Valuelist('0','>100 and <1000', '>1000 and <10000','>10000 and <50000','>50000'),'0','>100 and <1000', '>1000 and <10000','>10000 and <50000','>50000'),

Count({<Amount = {'0'}>}ID),

Count({<Amount = {">100 <1000"}>}ID),

Count({<Amount = {">1000 <10000"}>}ID),

Count({<Amount = {">10000 <50000"}>}ID),

Count({<Amount = {">50000"}>}ID)

)

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

You can do a calculated dimension

= if(AMOUNT = 0 ,'0',

if(AMOUNT >100 and AMOUNT < 1000, '>100 and <1000',

if(AMOUNT >1000 and AMOUNT <10000, '>1000 and <10000',

if(AMOUNT >10000 and AMOUNT <50000 ,'>10000 and <50000',

if(AMOUNT >50000,'>50000' )))))

Help users find answers! Don't forget to mark a solution that worked for you!
sunny_talwar

You are looking to do this in the script or the front end?

saumyashah90
Specialist
Specialist
Author

front end