Forum Discussion
jaw19883
5 years agoFrequent Visitor
Like a COUNTIF in Excel
Ok - Here is my question. Very new to Power Bi, but well-versed in Excel. I have a column of data, that unfortunatley is not the best to play with, but none the less it is exported this way to me. ...
- 5 years ago
The general pattern is to use filters. (See also the recommendations links in the sidebar.)
CALCULATE ( COUNT ( Table1[Section] ), FILTER ( VALUES ( Table1[Section] ), CONTAINSSTRING ( Table1[Section], "G.CO.5" ) ) )Edit: Changed LEFT condition to CONTAINSSTRING.
AlexisOlson
5 years agoSuper User
The general pattern is to use filters. (See also the recommendations links in the sidebar.)
CALCULATE (
COUNT ( Table1[Section] ),
FILTER (
VALUES ( Table1[Section] ),
CONTAINSSTRING ( Table1[Section], "G.CO.5" )
)
)
Edit: Changed LEFT condition to CONTAINSSTRING.
jaw19883
5 years agoFrequent Visitor
AlexisOlson That worked! Thank you! You also helped me start to see how the DAX logic works a bit differently. I look forward to understanding that more. Thanks again....