I need a DAX calculation which counts rows when two specific conditions are met in fields within the row. Such as "Approved" and "Open"

I need a DAX calculation which counts rows when two specific conditions are met in fields within the row. Such as “Approved” and “Open”
“C:\Users\Owner\OneDrive\Desktop\Beaver Water District Work Order Request Analysis.pbix”

Count If Column “Requests” Row 1 = Approved and Column “WO Status” Row 1 = Open and sum the count(s)

I am using the “Requests and Work Orders” File in my pbix

This calculation returns a value of 1 when I should expect a value of 22

Approved and Open Count = COUNTROWS(
FILTER(
‘Requests and Work Orders’,
‘Requests and Work Orders’[StApprovedtus] = “Approved” && ‘Requests and Work Orders’[Power-BI-Work-Order-Request-Dat.Status] = “Open”
))

Good evening @Anonymous67

The DAX-measure as you have presented works fine.
See also the attached PBIX with dummy data, Orderstatus count.pbix (26.1 KB)

Possible causes that the measure does not provide the correct count are

  1. a mix of text and numbers in the columns to be counted, which causes errors and incomplete upload.
  2. The text in the columns differs slightly from “Approved” and “Open”.

Hopefully this helps you further to analyse the problem, otherwise provide the PBIX with the issue.
KR Delta Select

1 Like