Forum Discussion

RickyTWK's avatar
RickyTWK
New Member
3 years ago
Solved

Count the data from filter rules

Hello, I work from construction company.

I would like to count two type of data which are naming start with "RFI-A" and "RFI-BS"

Can I do this in single column? 

Thank you so much!

 

  • RickyTWK ,

    Try this two measures,

    RFI-A = CALCULATE(
        COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-A"))
    RFI-BS = CALCULATE(
        COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-BS"))

    Thanks,

    Arul

4 Replies

  • Arul's avatar
    Arul
    Super User

    RickyTWK ,

    Try this two measures,

    RFI-A = CALCULATE(
        COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-A"))
    RFI-BS = CALCULATE(
        COUNT('Table (2)'[RFI NO]),CONTAINSSTRING('Table (2)'[RFI NO],"RFI-BS"))

    Thanks,

    Arul

    • RickyTWK's avatar
      RickyTWK
      New Member

      The formula not work....

      Am I missing somethings?

      Measure 2 = CALCULATE(COUNT('Issues'[RFI No.],CONTAINSSTRING('Issues'[RFI No.],"RFI-A")))
       
      I provide more information, the column of "RFI. No" have a lot of empty data.
      Only 11 row has value which are RFI-A and RFI-BS
      Thanks!

       

       

      • Arul's avatar
        Arul
        Super User

        RickyTWK ,

        You are missing close bracket for count and remove one close bracket at the end.
        Put a ) at yellow marked place before the comma and remove bracket at red marked place at the end of the formula..

        Thanks,

        Arul