Forum Discussion
Matrix: add frequency and hide when frequency <7
I made a matrix to show the mean score per item (EA-PI column) for each of the genders (male, female, other).
I am now looking for a way to show the frequency of the genders as well. So for example to make the header look like this: Male (n=15). I tried adding a tooltip but then the frequency only shows up if you hover over the scores, while I want to see it when I hover over the header, and I'd rather not have a tooltip on the mean scores.
I would also like to hide columns if their frequency is below 7 participants. For all my other visuals I used the following line of code:
IS Valid Group = IF(CALCULATE(DISTINCTCOUNT(OrigineleData[Respondent]) > 7; ALLSELECTED(OrigineleData)) = TRUE(); 1; 2)
and then used a filter on the visuals so they only show data when IS Valid Group = 1. However, this does not seem to work on the matrix.
Thank you for your help!
Hi Anonymous ,
We can try to create a measure as value field of matrix to meet your requirement:
Measure = If([IsValidGroup] = 1, Average('Table'[Value]), BLANK())(s3=7 was hidden when frequence reduce)
Best regards,
9 Replies
- v-lid-msft
Community Support
Hi Anonymous ,
When use Allselected function, all the cells will return same result, Could you please try the following measure?
IS Valid Group = IF ( DISTINCTCOUNT ( OrigineleData[Respondent] ) > 7; 1; 2 )If it doesn't meet your requirement, Could you please provide a mockup sample based on fake data or describle the fields of each tables and the relations between tables simply? It will be helpful if you can show us the exact expected result based on the tables. Please upload your files to OneDrive For Business and share the link here.
Please don't contain any Confidential Information or Real data in your reply.
Best regards,- AnonymousNot applicable
Thank you for your reply v-lid-msft, unfortunately your formula doesn't seem to work either. I uploaded my report on one drive for business here.
All data in this report are fake. The matrix I was referring to is on page "Details gender".
- v-lid-msft
Community Support
Hi Anonymous ,
Based on my research with sample model you have shared, we find the each row (items column) has the same Unique Response ID from 0 to 186, so the distinct count for each cells in matrix are large than 7, we think it is the reason why measure does not work.
For example, when items = "Persoonlijk Welzijn" and S3 = 1, the will be 28 distinct value in the “Respondant" column of origin table, does the 28 means the desire frequency?
Best regards,