Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Replicating Excel COUNTIF w/ DAX formula errors

Good Afternoon,   I am trying to replicate a COUNTIF formula in excel (=COUNTIF('Employee Data'!J:J,B6&"-"&C6&"-"&"Non Qual")) in Power BI, but I am running into some issues.    Here is my DAX fo...
  • Anonymous's avatar
    Anonymous
    7 years ago

    The relationships are all set up. Unfortanetly I cant share the pbix due to some of the data. But I was able to get it working with the below formula:

     

    Non Qual = if( isblank(CALCULATE(COUNTROWS('All User Listing'), Filter('All User Listing', AND('All User Listing'[OPS Qualification Level (if applicable)] ="Non Qual", 'All User Listing'[OPS Position Standing (if applicable)] = 'Benchmark Chart'[Position])))), 0, CALCULATE(COUNTROWS('All User Listing'), Filter('All User Listing', AND('All User Listing'[OPS Qualification Level (if applicable)] ="Non Qual", 'All User Listing'[OPS Position Standing (if applicable)] = 'Benchmark Chart'[Position]))))