Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
i am new in qlikview
i have year dimension,
i want to show below expression
if(year=1391,count(if (mid(employee_date,1,4)<=1391 ,personel_code)),
if(year=1392,count(if (mid(employee_date,1,4)<=1392 ,personel_code)),
if(year=1393,count(if (mid(employee_date,1,4)<=1393 ,personel_code))
)))
how can i show this ??
regards
i think you can simplify it at the script level by using an expression like below.
1. Create a new field such as Flag_emp, to create a flag per record where '1' indicates those records where the Year = Year of Employee_date
2. Load Year, ,
if(Year = mid(employee_date,1,4),1,0) as Flag_emp from <data srouce>
3. Use this field in your chart expression like below
Dimension: Year
Expression: count({<Flag_emp={1}>} personal_code)
I think this is likely best solved with a data model change. Could you attach a sample QVW where you are encountering the problem?
Can you explain more your question, please?
thanks alot
but how to create new field ?
i have a bar chart
dimension is year
i want to show number of personal in each year
number of my personal in each year is :
1392=10
1393=12
i want when i select 1393 in listbox , bar cahrt show 22
it means that when i select 1393 , equal no. of personal in 1392 + no. of personal in 1393
You can use acumulative option in the chart
may be try:
Variable:
vMaxYear = Max(mid(employee_date,1,4))
Set Analysis:
=Count({$< Year ={'<=$(=vMaxYear)'}>} personel_code)