Forum Discussion
Bebo
4 years agoHelper II
Measure to Count Rows that Meet Two Criteria
I have a table that contains three primary columns - Location (Text), Event Type (Text) and Event Value (Number). I have been trying to define a measure that will count the number of rows that meet specific criteria. For example, if Location=X and Event Type=Y and Event Value =Z, than count that row and summarize. Following is sample data:
| Date / Time | Location | Event Type | Event Value |
| Los Angeles | Valve | 0 | |
| Los Angeles | Feed | 1 | |
| Dallas | Feed | 1 | |
| San Antonio | Feed | ||
So, in the example above, count the number of rows that meet this criteria: Location = Dallas, Event Type=Feed,Event Value=1
Any ideas?
1 Reply
- ValtteriNCommunity Champion
Hi,
You can use FILTER combined with countrows.
E.g.Measure = COUNTROWS(FILTER(table,column1=state1&&column2=state2&&column3=state3))I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!