Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filter error to exclude blanks

Hi Experts

 

I cannot see the error here in my DAX' the filter filter is correct when I want to count the values and exclude blanks from second column I get an error..

 

Non MS Apps. = CALCULATE(COUNT(JohnH_SPO_EUCPriorityListAllDiv[Count]),FILTER(JohnH_SPO_EUCPriorityListAllDiv,JohnH_SPO_EUCPriorityListAllDiv[Microsoft or Not] = "Retain" || FILTER(JohnH_SPO_EUCPriorityListAllDiv,JohnH_SPO_EUCPriorityListAllDiv[Risk Based Criteria] <> BLANK())))

  • should you not use && rather than ||?  what  error are you getting

    Non MS Apps. =
    CALCULATE (
        COUNT ( JohnH_SPO_EUCPriorityListAllDiv[Count] ),
        FILTER (
            JohnH_SPO_EUCPriorityListAllDiv,
            JohnH_SPO_EUCPriorityListAllDiv[Microsoft or Not] = "Retain"
                && JohnH_SPO_EUCPriorityListAllDiv[Risk Based Criteria] <> BLANK ()
        )
    )

2 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    should you not use && rather than ||?  what  error are you getting

    Non MS Apps. =
    CALCULATE (
        COUNT ( JohnH_SPO_EUCPriorityListAllDiv[Count] ),
        FILTER (
            JohnH_SPO_EUCPriorityListAllDiv,
            JohnH_SPO_EUCPriorityListAllDiv[Microsoft or Not] = "Retain"
                && JohnH_SPO_EUCPriorityListAllDiv[Risk Based Criteria] <> BLANK ()
        )
    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you sir