Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Showing two measures with the filter selection

Hi All,

We have the hierarchy EmpNo,Incharge2,Incharge1.

Report should display EmpNo,dimesions with Sal,Comm.

Used the below expression for Dynamic two measures display with the filter selections.

=aggr(Sum({<Year=, Quarter=, Month=,StartDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Sal),EmpNo)

=aggr(Sum({<Year=, Quarter=, Month=,StartDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Comm),EmpNo)


I am unable to do this scenario:

If I select Q2, It should display Q1 Sal,Comm and Q2 Sal,Comm. How to achieve this.

Please find the attached file.

Capture.JPG

Thanks in advance.

19 Replies
antoniotiman
Master III
Master III

EmpNo E4 is related whit many Name (Ename4,Ename10,....)

Why EmpNo E4 -> Name Ename4 ?

In Calculated Dimension You change Min/MaxString with Your need.

qlikviewwizard
Master II
Master II
Author

Hi AntonioTiman ,

I have decoded the data actually.EmpNo E4 -->>> Name is Ename4.

Kindly advise.

antoniotiman
Master III
Master III

E4 -> Ename4,Ename8,Ename10

qlikviewwizard
Master II
Master II
Author

E4 -> Ename4

antoniotiman
Master III
Master III

Why E4 -> Ename4 and Why Not E4 -> Ename10 ?

However, try to change Calculated Dimension with

=Aggr(MinString(Left(Name,5))&Min(Num(Mid(Name,6,2))),EmpNo)

qlikviewwizard
Master II
Master II
Author

Hi  AntonioTiman, This working for this one but not working for other data.

qlikviewwizard
Master II
Master II
Author

Hi All,

Any solution? Please.

jagan
Luminary Alumni
Luminary Alumni

Hi,

PFA for solution.

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Used this script inside

Data:

LOAD

*,

Quarter & '-'& Year AS QuarterYear;

LOAD EmpNo,

     Name,

     Department,

     Job,

     ID,

     Incharge2,

     Incharge2Name,

     Incharge1,

     Incharge1Name,

     Sal,

     Date(HireDate) as HireDate,

     Date(StartDate) as StartDate,

     Month(Date(StartDate)) as Month,

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

     Year(Date(StartDate)) as Year,

     Date(LastDate) as LastDate

FROM

[A - Copy (1).xlsx]

(ooxml, embedded labels, table is Employee);

Temp:

LOAD Incharge1 AS EmpNo,   

     Sal AS Incharge1Sal,

     QuarterYear    

RESIDENT Data

WHERE Len(Trim(Incharge1)) > 0;

Temp:

LOAD Incharge2 AS EmpNo,   

     Sal AS Incharge2Sal,

     QuarterYear    

RESIDENT Data

WHERE Len(Trim(Incharge2)) > 0;

and used below expression

=Sum({<Year=, Quarter=, Month=,StartDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Sal) +

Sum({<Year=, Quarter=, Month=,StartDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Incharge1Sal) +

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

Hope this helps you.

Regards,

Jagan.

qlikviewwizard
Master II
Master II
Author

Dear jagan,

You are amazing. Thanks a million.