Forum Discussion
Anonymous
4 years agoNot applicable
DAX equivalent to %LIKE% in sql - to count IDs
Hello, I am trying to do a simple count in Power BI using dax. In sql, I would simply use this function to pull my data: Select count (distinct Client_ID) Client_ID from table Where st...
- 4 years ago
Hi Anonymous ,
You may be trying to compare a date field against a string value. This should work:
CALCULATE( COUNT(clients[CLIENT_ID]), SEARCH("UNIVERSITY", clients[School], 1, 0) > 0, clients[start_date] >= DATE(2021, 03, 16) )
davehus
Memorable Member
4 years agoHi,
Have you tried just adding a column in PowerQuery and use a conditional column to say if column contains University then 1 else 0. Then use this column in place of the search function using and Filter(&&) clause at the end of the calculate measure.