Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
SonOfJeffGoldblum
Contributor III
Contributor III

count set analysis

I have a table that shows role, name, and max count of times among all persons who has filled the role the most (ignore the duplicate "Speaker - ?" instances here).

RoleName#
CaptainGeorge Costanza3
TreasurerKosmo Kramer2
MinutesElaine Benes3
SpeakerBob Sakamano1
Speaker - ?Kosmo Kramer1
Speaker - ?Tim Watley1
EvaluatorTim Watley2
TimerBob Cobb4
VisitorEstelle Costanza18

 

How can I show if a role has a tie for # times filled? The resulting table would show the two extra Speaker Instances here.

=count({<Role-={"Analyst"}>}Name)

Limitation: Role: Fixed Number = 7

Limitation: Name: Fixed Number = 1

Everything not saved will be lost
— Nintendo Quit screen message
Labels (3)
1 Solution

Accepted Solutions
SonOfJeffGoldblum
Contributor III
Contributor III
Author

Solution:

Using Ranking

=if(rank(count(Role),1,0)=1,count({<Role-={"Attendee"},Name={"=count(Name)"}>}Role))

Everything not saved will be lost
— Nintendo Quit screen message

View solution in original post

10 Replies
Anil_Babu_Samineni

I am not seeing anything related 'Analyst' as value in your field? May be use DISTINCT keyword

=count(DISTINCT {<Role-={"Analyst"}>}Name)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
SonOfJeffGoldblum
Contributor III
Contributor III
Author

Analyst is a role that we do not want to count for, yet is always in attendance.

Thank you for your response, however, this does not bring the correct result.

I attached a sample document to perhaps make it easier to understand the goal.

If there is a chart function that can load all values if there is a tie for count of a role such as Captain where 3 persons have filled that role three times, yet only one is captured visually, that would be marvelous.

Analyst again, it is fulfilled, but not tracked for our purposes, so it is not included in the example file.

Thank you so much!

 

Everything not saved will be lost
— Nintendo Quit screen message
sunny_talwar

I am a little confused as to what the final output needs to look like? One of these is showing the desired output here?

image.png

 

SonOfJeffGoldblum
Contributor III
Contributor III
Author

I am currently showing the top version (Before)

The desired output is the bottom version (After)

Everything not saved will be lost
— Nintendo Quit screen message
sunny_talwar

What are you dimensions and expression for before version?

SonOfJeffGoldblum
Contributor III
Contributor III
Author

Dimensions:

Role

Name

Expression:

=count({$<Role-={"Analyst"}>}Name)

    *Analyst is a role that attends, but is not needed for the purpose of this visual

Other fields:

Meeting_Date

Former - True/False if member is a former member

Everything not saved will be lost
— Nintendo Quit screen message
sunny_talwar

Original expression gave me this (not sure how you got the before result)

image.png

But if I use this (it seems to match with your after result that you need)

=If(count({$<Role-={"Analyst"}>}Name) > 1, count({$<Role-={"Analyst"}>}Name)) 

image.png

SonOfJeffGoldblum
Contributor III
Contributor III
Author

Sunny,

Thank you!

I have tried that before, but that resulted in showing all records. I added limitations within the dimensions to limit how many showed at that point. This is where I added the top # roles to show at least a value per role. However, by showing the top #1 Name, you only get one name returned when there is a tie or not.

Attached another doc that shows the first tab using the formula suggested.

The second tab shows what is expected but is not showing. I removed the limitations in the dimensions.

Everything not saved will be lost
— Nintendo Quit screen message
SonOfJeffGoldblum
Contributor III
Contributor III
Author

Thoughts/ideas to why still does not display as expected? In other words, the previous response had a tab with expected result which is not appearing. Most likely from the ">1" portion in the expression. 

thank you

Everything not saved will be lost
— Nintendo Quit screen message