Forum Discussion
Countrows in multiple column based on partial text value
Hi LaurensM02 ,
Your DAX won't work. That is because
>= operator will work only with numbers. But you are using >= with a string value
i.e.
COUNTROWS(FILTER('Sheet1', 'Sheet1'[Linked Issues.1] >= "THGRW-000"))
In the above DAX, THGRW-000 is a string and hence cannot be used with a >= operator
You will have to use a == operator or an IN operator to compare text and count. Then sum the different conditions.
If you want more focused answer, pls. share how your output should look.
Hi Thejeswar,
Thanks for your quick response. I am using the measure for a card visual that shows the total number of rows that meet the filter conditions. So the output should eventually be a number.
Also I tried using a wildcard character in the text value, since the filter needs to count every row where one of the Linked Issues columns contain a value that starts with "THGRW-", but I could not get that working.
- Thejeswar2 years agoSuper User
You can convert your table to look like below using Unpivot Columns option in Power Query Editor
Refer below link
Post that you can use the below DAX to get the ouput that you were expecting. In this case there are 5 combinations having "THGRW" in them
- LaurensM022 years agoRegular Visitor
I have a strange problem before I want to start unpivotting columns. The following formula gives me the correct number of rows. But whenever I change it to [Linked Issues.2] or another number, the formula returns a blank.