Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - difficulty

Hi,

I am doing a report and want to display the total number of people who are in the report for the report number (there are several backlog of reports so the number of people in each report changes). I've been trying to use Set Analysis to display the total numbr of people that are in the report selected ( I dont want this number to changed based on selections ) but it either gives me an error or the the total number of people in the field (i.e there might be 30 people in the report but it returns 45, the total number of people across all reports). Does anyone have any suggestions?

7 Replies
oknotsen
Master III
Master III

So the report follows a selection, but you do not want to use a simple count to use the result of that count as the number you are looking for?

Maybe I should ask a return question:

How is the data for the report being decided? A selection? Set Analysis statements? All data?

May you live in interesting times!
Not applicable
Author

Hi Onno,

I have a dashboard that keeps track of people, but its across multiple excel documents that are loaded in. I created a text object to display the total number of people in whichever report is selected (there is always at least one selected), and I have been trying multiple ways of getting this number. My problem is when I just use the Textcount command, it changes if further selections are made in the dashboard or if I use set analysis it gives me the total number of counted names, which is wrong as while there might be 45 names, only 30 are relevant in the report.

I want to display the total number of people that are in each report but it to remain a fixed value.

oknotsen
Master III
Master III

Sounds to me like something that could be solved with Set Analysis in combination with Alternate States.

Create an Alternate State (lets say you called it "State1"). Lets assume the field that contains your report names is called "ReportName" and we are counting the field EmployeeID.

In your Text Object, put this expression:

= count({State1 < ReportName = $::ReportName > } distinct EmployeeID)

May you live in interesting times!
Not applicable
Author

Close, it is no longer affected by other selections but it the number doesnt change depending on the report, it stays fixed on the report that was active when I typed the code

oknotsen
Master III
Master III

It should change when you select a different report in a List Box with the ReportName in it (assuming you did not put that thing in State1 but left it in the default state).

Or at least that is how it should be working.

My guess is we are having a difference in opinion in what you mean with "Report". My idea is that you somehow flagged the different XLS you are loading with a ReportName. If it is something else, please explain.

May you live in interesting times!
Not applicable
Author

Sorry got it to work. The problem was that the multi box was in the default state, but when I changed it to the State1 it works. New problem though, the other information wont change with the different reports. In other words, if I leave it in the default state it, the text object doesnt change, but if I put in State1, then all the other information in the dashboard wont change to reflect a change in report

Not applicable
Author

Suggestions?