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
ryan_mayu
Super User
1 year agohow do you want to display the output? in the card or in a table?
You can try Anonymous 's solution. That will work
if you want to display in a card, add the meausre to the card
if you want to display in a tabel, try to update the measure
measure 2 = if(max('Table'[Country])="US" &&max( 'Table'[Level])=5 || max('Table'[Country])="MX"&& max('Table'[Level])=4,1)
and add the measure to visual filter and set to 1
pls see the attachment below