Forum Discussion
Anonymous
7 years agoNot applicable
Multiple filter conditions
Hi,
I got the table DimCompanyHis (it contains more columns but these are not relevant for the filtering).
company category and company subcategory are textual columns.
| Company name | Company category | Company subcategory |
| A | 1 | 25 |
| B | 1 | 28 |
| C | 1 | 33 |
| D | 1 | 33 |
| E | 1 | - |
| F | 2 | 18 |
| G | 2 | - |
| H | 2 | - |
| I | 3 | 12 |
| J | 4 | 33 |
I need to filter out companies:
1. Company category = "2"
OR
2. Company category = "1" AND Company subcategory = "33"
This is too much for the regular Power BI filter options so I need DAX.
I tried a query with CALCULATEDTABLE but I got the scalar value vs multiple value error.
Any ideas?
Thx in advance!
6 Replies
- parry2kSuper User
Anonymous try following measure
Your Measure = CALCULATE( SUM(Table[Sales]), Company[Company Category]="2" || AND( Company[Company Category] = "1", Company[Compay Subcategory]="33") )
- AnonymousNot applicable
Why the SUM?
My category and subcategory are textual values (saying this I know that I could have created better example data:-) ).- parry2kSuper User
Anonymous sum was just to show how to apply or condition in your measures.