Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help : Qlik Sense

Hi Friends,

I am trying to plot a graph where wanted to show the average headcount month on month. Data has a columns which contains closing headcount of the month.

The formula am trying is as follows:

(Count of closing headcount of current month + Count of closing headcount of previous month) / 2

Please help in getting the same. Dummy data is attached for reference.

1 Solution

Accepted Solutions
11 Replies
sunny_talwar

Try this:

If(RowNo() > 1, RangeAvg(Above(Count([Emp Name]), 0, 2)))

Capture.PNG

Not applicable
Author

Thanks Sunny !! Its working fine. Can you do one more favor on tis please.

have added one more column which has client names like: A & B. When am trying to get the average headcount for A & B separately, data is not showing correct. This is what m using:

If(RowNo() > 1, [Client]={"A"}, RangeAvg(Above(Count([Emp Name]), 0, 2)))

Please see if there is a way..

sunny_talwar

Not sure what you are trying to do, can you may be elaborate a little?

Not applicable
Author

Earlier, we have two columns in the data which contains Employee Name and Headcount as on closing of the month. Now Have added one more column into the data which has client names like A&B. So now I am trying to get the average headcount month on month separately for Client A & B.

You may add the column named Client fill randomly A or B.

Hope this clarifies.

sunny_talwar

May be like this:

Aggr(If(RowNo() > 1, RangeAvg(Above(Count([Emp Name]), 0, 2))), Client, MonthEnd)


Capture.PNG

Not applicable
Author

I presume, you attached the wrong qvf file.....

sunny_talwar

Oops, fixed now

Not applicable
Author

Thanks a ton Friend 🙂

sunny_talwar

Kaushal I am glad you found your solution, but I request you to mark only those answers as correct or helpful which actually provide a real solution my friend. "Oops, fixed now" doesn't really provide much of a solution and won't help people in the future.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny