Forum Discussion

jaw19883's avatar
jaw19883
Frequent Visitor
5 years ago
Solved

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.  ...
  • AlexisOlson's avatar
    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.