Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Count based on two columns

I am pulling data from an access database based on a Vendor ID and I would like to count the number of instances where the accepted column and the rejected column both equal false.

 

Any help would be greatly appreciated.

 

Mike

  • Anonymous better paste sample data but try the following measure:

     

    Measure = 
    CALCULATE ( COUNTROWS( Table ), Table[AccpetedColumn] = FALSE(), Table[RejectedColumn] = FALSE() )

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

4 Replies

  • Anonymous better paste sample data but try the following measure:

     

    Measure = 
    CALCULATE ( COUNTROWS( Table ), Table[AccpetedColumn] = FALSE(), Table[RejectedColumn] = FALSE() )

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks parry2k.  Worked perfectly!

  • v-alq-msft's avatar
    v-alq-msft
    Community Support

    Hi, Anonymous 

     

    Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

    Table:


    You may create a measure as below.

    Count = 
    COUNTROWS(
        FILTER(
            ALL('Table'),
            [Rejected]=FALSE()&&
            [Accept]=FALSE()
        )
    )

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Allan.  Really appreciate the time you put into this to help a newbie out!