Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
buddhabang
Contributor III
Contributor III

Set Analysis in Gauges

Hi,

I had a question if anyone could please help me with a set analysis i'm using in a gauge. I have a list of departments and calculated the number of employees in each one of these and wanted to get the ratio per dpt. My problem is this following set A in the gauge expression that only works for just the marketing dpt:

(count({$<Department={Marketing}>}Employee_ID)*100)/count(DISTINCT Employee_ID)

I want to be able to get the ratio for each individual department. Any help would be much appreciated.

Thanks

1 Solution

Accepted Solutions
Not applicable

Here.

I make a text object to check and the numbers seem right.

Regards

View solution in original post

11 Replies
Not applicable

You could use trellis (in the dimension tab) and add Department as a dimension. Erase the set analysis.

buddhabang
Contributor III
Contributor III
Author

Thanks Levi, not sure about Trellis, never came across it. Thanks for looking into it

Not applicable

Take a look at it, I think is by far the best solution

Not applicable

If your Department resides in the same table as Employee_ID what you could do is create a listbox with the Department, then check the box Show Frequency and In Percent

buddhabang
Contributor III
Contributor III
Author

Thanks guys for taking the time to look into this. First Levi, i've done exactly that unfortunately when i delete the set analysis in the expression after using Trellis, i get "All expressions disabled" as a result. But when i do leave the set analysis i get all the gauges from each dept using Trellis which by the way i like very much, so thanks, but still the calculations are incorrect. My problem i beleive is the set analysis, any ideas.

Marc, that was kind of you, already knew that

Not applicable

Could you upload your qvw to work directly on it?

The idea is like this:

buddhabang
Contributor III
Contributor III
Author

Thanks Levi, i'll check it tomorrow at work i'm at home now. I've uploaded mine. Cheers mate.

Not applicable

Here.

I make a text object to check and the numbers seem right.

Regards

Not applicable

What numbers are you expecting? I may be confused to what you are looking for.

Take a look at this. Your gauges seem to be set to 100 where percent is in decimals. Changing limits to reflect that is one of the things I changed