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: 
qlikviewwizard
Master II
Master II

Showing data dynamically

Hi All,

I have the data with the below columns as shown in attached file. 

EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO,LASTDATE,GETDATE

I want to show the Salary of the employees in a straight table based on JOB on Quarterwise (Q1,Q2,Q3,Q4 based on GETDATE).

Please help me.

When I select:

Q1 >>> Should display Q1 Salary of the year,

Q2 >>> Should display Q1,Q2 Salary of the year,

Q3 >>> Should display Q1,Q2,Q3 Salary of the year,

Q4 >>> Should display Q1,Q2,Q3,Q4 Salary of the year,


Thanks in advance.

11 Replies
qlikviewwizard
Master II
Master II
Author

Hi All,

my report should show dynamically Q1,Q2,Q3,Q4 dynamically. But need to sum of measures

If I select Q1>>>>> should show Q1: Sal,Comm,% (Comm/Sal)

If I select Q2>>>>> should show  Q1: Sal,Comm,% (Comm/Sal),Q2:Sal,Comm,% (Comm/Sal) ,Q1+Q2,

If I select Q3>>>>> should show Q1: Sal,Comm,% (Comm/Sal), Q2:Sal,Comm,% (Comm/Sal) ,Q1+Q2, Q1+Q2+Q3,

If I select Q4>>>>> should show Q1: Sal,Comm,% (Comm/Sal), Q2:Sal,Comm,% (Comm/Sal) ,Q1+Q2, Q1+Q2+Q3,Q1+Q2+Q3+Q4

Please help me.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

EMP:

LOAD

     EMPNO,

     ENAME,

     JOB,

     MGR,

    date(HIREDATE,'DD-MMM-YYYY') as HIREDATE,

     SAL,

     COMM,

     DEPTNO,

    LASTDATE,

     Date(GETDATE, 'DD-MMM-YYYY') as GETDATE,

     Year(GETDATE) as Year,

     month(GETDATE) as Month,

     num(Month(GETDATE)) as MonthNo,

     Ceil(month(GETDATE)/3) as QtrNo,

    'Q'& Ceil(month(GETDATE)/3) as Quarter,   

     if(GETDATE > LASTDATE, MGR, ENAME) As [Emp - Current]

FROM

EMP.qvd

(qvd);

Remove all the remaining script.

Now Create a variable

vStartDate = Date(YearStart(Max(GETDATE)), 'DD-MMM-YYYY')

vMaxDate = Date(Max(GETDATE), 'DD-MMM-YYYY')

Now in set analysis use this expression

=Sum({<Year=, Month=, Quarter=, GETDATE={'>=$(=vStartDate)<=$(=vMaxDate)'}>} SAL)

Hope this helps you.

Regards,

Jagan.