Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have two questions:
How best can I achieve this?
How do I create this along with the Syntax?
Hi Mohbeen, welcome to the world of Qlik... I am not sure what you mean when you say that you want to know the steps. There are no steps... All you need is a bar chart with two dimensions
1) Year
2) Employee
and then use the expression that I gave above and it should most likely work... if for some reason it doesn't work and you are using QV12 or above or Qlik Sense, you can try this expression
Aggr(RangeSum(Above(Count(Leave), 0, RowNo())), Employee, (Year, (NUMERIC)))
The above syntax is a new option that came out with QV12. You can read about it more here
1) May be try this
Aggr(RangeSum(Above(Count(Leave), 0, RowNo())), Employee, Year)
2) What syntax? Do you have a sample you can share to show what you have... so that we can help better
How do I create this along with the Syntax?
Hi Sunny- Thanks for your speedy response
I'm relatively new to Qlik, please could you explain step by step how to carry out this for question no.1
1) what columns would be the dimensions be as well as the expressions. Where would the expression you provided be typed in?
2) I will provide the sample data for question 2
Hi Mohbeen, welcome to the world of Qlik... I am not sure what you mean when you say that you want to know the steps. There are no steps... All you need is a bar chart with two dimensions
1) Year
2) Employee
and then use the expression that I gave above and it should most likely work... if for some reason it doesn't work and you are using QV12 or above or Qlik Sense, you can try this expression
Aggr(RangeSum(Above(Count(Leave), 0, RowNo())), Employee, (Year, (NUMERIC)))
The above syntax is a new option that came out with QV12. You can read about it more here
Thank you Sunny! Worked fantastic!
This is how it came out :
I know how to change it to a stacked bar graph, however how do I stack both 2017 and 2018 per employee?
I guess in that case, you might need to switch your dimensions
1) Employee
2) Year
and then select the stacking
With regards to Question 2, here's a sample of what I'm trying to achieve but with a pivot table or table view:
The dimensions Would be Employee and Leave, what would the expressions look like?
I would use set analysis to do this
Expression1
Sum({<MonthYear = {"$(=Date(Max(MonthYear), 'MMM-YY'))"}>}Measure)
Expression2
Sum({<MonthYear = {"$(=Date(AddYears(Max(MonthYear), -1), 'MMM-YY'))"}>}Measure)
Expression3
Column(1) - Column(2)
Where MonthYear is created in the script like this
Date(MonthStart(DateField), 'MMM-YY') as MonthYear
Thank you! Appreciate it Sunny