Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have a table like this:
Invoice | Item | Amount |
---|---|---|
1 | A3SGH | 560 |
1 | B6REW | 327 |
1 | B45WR | 321 |
2 | NG2432 | 654 |
2 | NH354 | 987 |
3 | NGWR4 | 159 |
3 | O356GX | 753 |
3 | N46T | 357 |
3 | P56R | 483 |
4 | RTY5653 | 127 |
4 | C1E1356 | 982 |
4 | HH67M | 357 |
5 | UY8743 | 586 |
5 | RG243 | 584 |
5 | MNL885 | 542 |
5 | G5462S | 532 |
So, I have this:
Invoice | Total Amount |
---|---|
1 | 1,208 |
2 | 1,641 |
3 | 1,752 |
4 | 1,466 |
5 | 2244 |
Now I want the number of invoice in specific price range. Like this table:
Invioce Amount Range (IAR) | No. of Invoice |
---|---|
IAR < 1000 | 0 |
1000 < IAR < 1500 | 1 |
1500 < IAR < 2000 | 3 |
2000 < IAR | 1 |
Please help me.
Thank you in advance.
Regards,
Ashkan
Hi,
I have used thes traight table and the calculated dimension would be as below:
=Class(Aggr(sum(Amount),Invoice),500, 'IVR',500)
and the expression is
Count
( DISTINCT Invoice)
Hi,
May be this can help you.
Hi venugopal4s
Thanks for your reply
Could you please write the script? I'm using Qlikview PE and I can't open other .qvw files.
Hi,
I have used thes traight table and the calculated dimension would be as below:
=Class(Aggr(sum(Amount),Invoice),500, 'IVR',500)
and the expression is
Count
( DISTINCT Invoice)
Hi,
First create bucket like if(sum(Amount)<1000, 'IAR<1000', if(sum(Amount)>1000 and sum(Amount)<=1500,'1000 < IAR < 1500')) like other also in calculated dimension. and use an expression as Sount(Distinct(Invoice)) in expression.
Regards,
Khadeer
Thank you so much my friend.