Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Keeping the filtering function of current selection while disregard it in count function

Dear all,

I have encountered the following problem.

I have made 2 straight table in a dashboard.

Suppose the first table consists of the information for students, while the second table consists of the information of interest club in school. Since one student can belong to several interest club, I expected that when I click on one student, the second table will shows the interest group the student belong to. The problem is, there is a column displaying the total number of students in that interest club and when I click on the student, the number will become 1 as expected. I have tried to use count({} distinct student) and it can fix the problem of number of count. However, the filtering function is also disabled. That is, now the second table (the interest club) will show all the interest club instead of the interest club that the selected student belong to.

Would you please advise?

Message was edited by: ivy ting

15 Replies
rubenmarin

Hi, maybe something like:

count({<student>} distinct student)

This count students removing the selection in the 'student' field

Hope this helps, if not I can give a more accurate answer if you upload a sample

Not applicable
Author

Thanks a lot. It works! Could you please explain a bit the meaning for {<student>} in the expression?

rubenmarin

It's 'set analisys'. That means to ignore the selections in 'student' field for that count sentence

Not applicable
Author

Sorry it didn't work as expected after further testing.I can the count correct but table 2 shows all the values in the data set instead of the data of the student. It is probably because the selections in 'student' field is ignored.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you post sample app with expected output to look over.

Regards

ASHFAQ

Anonymous
Not applicable
Author

Hi ,

Which fields are common in your both table (for association). Look into your model.

Can you post the sample data.

morganaaron
Specialist
Specialist

Hi Ivy,


The way in which I got this to work before was to create a resident load in your script for your "interest" and load the students again, so as "students2" for example (therefore your resident load is interest and students as students2 for example).

You can then have students in a listbox, but your table becomes interest as the dimension and =count(Distinct Student2) as your expression; therefore it will filter to only the interests that student has, but will count the number of students from student2 that have that entire interest.

rubenmarin

Hi ivy, I'll need a sample data to give a more accurate answer

Not applicable
Author

sample attached