Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any way to do this in Qlik sense?
What data do you have and what data do you want it to work out ?
Hi, there are multiple ways, depends on where you want to have this tables calculated - in load script or report level. In load script, you can try something like this:
main:
load * inline [
no_of_works, no_of_staff
5,10
6,15
7,10
8,5
9,15
10,6
12,10];
aggr:
load
if(no_of_works>=5 and no_of_works<=6, '5-6',
if(no_of_works>=7 and no_of_works<=9, '7-9',
if(no_of_works>=10, '10 and more', 'other'))) as no_of_works_aggr,
sum(no_of_staff) as no_of_staff_aggr
resident main
group by
if(no_of_works>=5 and no_of_works<=6, '5-6',
if(no_of_works>=7 and no_of_works<=9, '7-9',
if(no_of_works>=10, '10 and more', 'other')));
EMPLOYEE_TABLE:
LOAD * Inline [
No Weeks, No Staff
5,10
6,15
7,10
8,5
9,15
10,6
12,10];
Regards,
SK