Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Should I use Count ?

Hi,

I have a database of staff holidays.

How do you calculate the number of staff who have exceeded 30 days holiday in a particular location? Do I need to use set analysis within a Count to define the location ?

Any help would be useful

Thanks,

MW

1 Solution

Accepted Solutions
Michiel_QV_Fan
Specialist
Specialist

Something like this:

To select the location:

count({<Location = {'The value from your location dimension'}>}Staff)

And with days more than 30

count({<Location = {'The value from your location dimension'}, Holiday_days  ={">=31"}>}Staff)

change the fields according to your field names

View solution in original post

8 Replies
Michiel_QV_Fan
Specialist
Specialist

That is a possible solution.

Are you searching for the syntax for this?

sujeetsingh
Master III
Master III

One thing if it is that you want to count  it then use count.

Well will you please explain your scenario ?

Not applicable
Author

use may use count and aggregate functions based on your requirement

Not applicable
Author

Hi, Michiel.

Yes, please. I am not familiar with coding in QlikView so I am finding it a little hard to learn.

Thanks,

MW

Not applicable
Author

Any example code would be great.

Thanks,

MW

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use StaffID or Name, Location as dimensions and use the following expression in straight or pivot table

=If(Count(HolidayFieldName) > 30, Count(HolidayFieldName))

Hope this is what you are expecting.

Regards,

Jagan.

Michiel_QV_Fan
Specialist
Specialist

Something like this:

To select the location:

count({<Location = {'The value from your location dimension'}>}Staff)

And with days more than 30

count({<Location = {'The value from your location dimension'}, Holiday_days  ={">=31"}>}Staff)

change the fields according to your field names

Not applicable
Author

Thankyou Gentlemen.

You were very prompt and helpful.

Regards,

MW.