Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I have help regarding below data:
Table1:
USERID TAT
1 5
2 11
3 7
4 4
5 3
I need to clasify this values in below bucket according to TAT:
Bucket:
0 to 5
0 to 10
> 0 or all
O/p
~so in my 0 to 5 bucket user id comes- 1,4,5
~so in my 0 to 10 bucket user id comes- 1,4,5,3
~so in my > 0 or all bucket user id comes- 1,4,5,3,2
Thanks,
Arvind Patil
Something like
Bucket:
LOAD DISTINCT TAT, Dual('0 to 5',1) as Bucket
RESIDENT YourTATTable
WHERE TAT <=5;
LOAD DISTINCT TAT, Dual('0 to 10',2) as Bucket
RESIDENT YourTATTable
WHERE TAT <=10;
LOAD DISTINCT TAT, Dual('>0 or all',3) as Bucket
RESIDENT YourTATTable
;
Now the Bucket groups link to the correct TAT values, so you can use them e.g. as dimension in your chart to count users.
edit: added DISTINCT qualifier.
Something like
Bucket:
LOAD DISTINCT TAT, Dual('0 to 5',1) as Bucket
RESIDENT YourTATTable
WHERE TAT <=5;
LOAD DISTINCT TAT, Dual('0 to 10',2) as Bucket
RESIDENT YourTATTable
WHERE TAT <=10;
LOAD DISTINCT TAT, Dual('>0 or all',3) as Bucket
RESIDENT YourTATTable
;
Now the Bucket groups link to the correct TAT values, so you can use them e.g. as dimension in your chart to count users.
edit: added DISTINCT qualifier.
Hi Stefan,
Is there any way i can achieve this in same table.
Thanks,
Arvind Patil
I think not without duplicating your fact table records.