Forum Discussion
Filter/Hide Matrix row If Column Value Has One or More Zero
- 6 years ago
Solved. I created the following measures:
1. # Categories = DISTINCTCOUNT('FACT-ELEMENTS'[CatName]) - calculates number of categories each User has a value > 0.
2. # Categories (Max) = CALCULATE(DISTINCTCOUNT('FACT-ELEMENTS'[CatName]), ALLSELECTED('USERNAMES'[User_ID])) - calculates the maximum number of categories across all users, i.e., the maximum number of categories I could have if all had a value >03. # Categories (Show Row) = IF([# Categories]=[# Categories (Max)], 1,0) - used to filter the matrix visual. If 1, user has at least a value >0 in each category and should be shown. Anything else is suppressed.
You can put a visual filter.
If data is pivoted first unpivot it
https://radacad.com/pivot-and-unpivot-with-power-bi , cat a and Catb goes to response
Then you have a formula like
Calculate(count(user_id),[response]>0)
Amitchandak - not exactly sure what that formula is trying to do, but it gives me a type mismatch: User_id is text and can't use it. All I want to do is remove rows that do not have all values > 0. One would think that would be pretty simple. Works easy enough when I have one column but not when there are multiple categories from the same column.
- amitchandak6 years ago
Super User
Can you share sample data and sample output.
Appreciate your Kudos.Mark me with @
- Anonymous6 years agoNot applicableOk then first convert that cat A into int.
Add that cat A to visual level filter and set it as greater than 0.
If cat a is column then simplelu unselect 0 from visual level filter for cat A
If measure convert it it int and add to visual level filter.
Thanks
Pravin