Forum Discussion
Matrix Table Visual - Omitting Data Less Than 10 Within Individual Cells, Not Totals
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Result =
SUMX(
SUMMARIZE(
'Table',
'Table'[Gender],
'Table'[Ethnicity],
'Table'[Year],
"Result",
IF(
SUM('Table'[Value])<10,
BLANK(),
SUM('Table'[Value])
)
),
[Result]
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Hi,
Thanks for your help. I should provide more detail. The solution you have offered works and I think I understand how it works. You can see below that now my count of female African-American participants are now omitted from the data because there are less than 10 participants.
The details that I did not provide is that I have multiple tables that include calculations. Sometimes the # of participants ('Table'[Value] in your case) are needed in the Values of my matrix, but in most other cases, they are not.
So, for example, in addition to table that showed # of participants by gender and ethnicity, I have tables that show the percentage of those who ordered a hamburger by gender and ethnicity (Hamburger_Rate = DIVIDE(sum('Table'[Hamburger], sum('Table'[Value2]))).
However, the Hamburger_Rate is calculated by dividing by the # of Non-Vegetarians (denoted as 'Table'[Value2]), not # of Participants ('Table'[Value]). However, I would like to only display it if 'Table'[Values] < 10, NOT 'Table'[Value2]< 10.
In other words, this is what I have now:
In this instance, I would to omit African-american female percentages to parallel my first table because their 'Table'[Value] < 10. I would like all my table to rely on 'Table'[Value] < 10, even if I am not using that as my primary Value field in my matrix.
Ideally, I would prefer not to create multiple measures (this report will contain many measures and I'd prefer to avoid that for efficiency), but if that is the only solution, then I will make do.
As such, if I were to go the measure route, here is what I tried:
Result2 = SUMX( SUMMARIZE( 'Table', 'Table'[Gender], 'Table'[Ethnicity], 'Table'[Year], "Result2", IF( SUM('Table'[Value])<10, BLANK(), DIVIDE(sum('Table'[Hamburger], sum('Table'[Value2])) ) ), [Result2] )But am getting the following error: Too many arguments were passed to the IF function. The maximum argument countfor the function is 3.
Any ideas to either update this measure and/or a workaround to filter these tables the same way?