Forum Discussion
JacobMich
1 year agoRegular Visitor
How do I filter POWERBI data in my visual workspace based on values in two columns?
I am working in PowerBI. I am looking for a specific filtering and counting of information from an already transformed query. The raw data of what I am asking for can be seen in the Table Below. I...
- Anonymous1 year ago
Filtered Count =
CALCULATE(
COUNTROWS('YourTableName'),
FILTER(
'YourTableName',
('YourTableName'[Country] = "US" && 'YourTableName'[Level] = 5)
|| ('YourTableName'[Country] = "MX" && 'YourTableName'[Level] = 4)
)
)
Replace with Table Name as per yours
danextian
Super User
1 year agoHi JacobMich
I'm not sure what you expected results are but try these measures:
US and 5 =
COUNTROWS ( FILTER ( 'Table', 'Table'[Country] = "US" && 'Table'[Level] = 5 ) )
MX and 4 =
COUNTROWS ( FILTER ( 'Table', 'Table'[Country] = "MX" && 'Table'[Level] = 4 ) )
Both =
COUNTROWS (
FILTER (
'Table',
( 'Table'[Country] = "US"
&& 'Table'[Level] = 5 )
|| ( 'Table'[Country] = "MX"
&& 'Table'[Level] = 4 )
)
)