Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have data of all month refer below table.
Emp_no. Emp_designation
1 AB
2 CD
3 EF
4 GH
5 JK
suppose i have select only current month for above table have to show the current month data.so how to write set anaylsis for this condition ?
e.g.
Emp_no. Emp_designation Current_Month_Emp_Designation
1 AB AB
2 CD CD
3 EF EF
thanks in advance.
Use below in your script...
Load *, Month(Period) as Month;
Load Emp_no, Emp_designation, Date(Alt(Date#(Period,'M/DD/YYYY'),Date#(Period,'M/D/YYYY'))) as Period Inline
[
Emp_no,Emp_designation,Period
1, AB, 10/23/2014
2, CD, 10/25/2014
3, EF, 10/29/2014
4, GH, 9/28/2014
5, JK, 9/26/2014
];
Now create a Straight Table
Dimension
Emp_no
Emp_designation
Expression
Only({<Month = {'$(=Month(Today()))'}>}Emp_designation)
If you want to count number of Employee for current month, use below
Count({<Month = {'$(=Month(Today()))'}>}Emp_designation)
or
Count({<Month = {'$(=Month(Today()))'}>}Distinct Emp_designation)
For that you need to have Month column or Date column in your database...
Hi Manish,
thank u for your qiuk reply.
i have Period column in my data base and i have also try below one expression
sum(<period={"$ (=max(period))"}>Emp_designation)
but it showing Zero valu and also don't know is it right or wrong?
so,need help
Hi,
Here you dont have the Month column in your data.
How your period column data looks like? Kindly provide sample...
Dear Ishwar,
If you have period in your data base then acc. to qlikview logic If you select a month form period then it will automatically show current month data.
Thanks & Regards
Prince Anand
Hi,
if period is date format then you have to use =Month(max(Period))
Try like this
sum(<period={"$ (=Month(max(Period)))"}>Emp_designation)
Regards,
Dear Ishwar,
Something is missing in your expression :-
Your expression:- sum(<period={"$ (=max(period))"}>Emp_designation)
Modified expression:- sum({<period={"$ (=max(period))"}>}Emp_designation)
Try this one.
Thanks & Regards
Prince Anand
Hi
HTH
Jonathan
share the sample data for period coloumn