Forum Discussion

jharsh's avatar
jharsh
Frequent Visitor
4 years ago
Solved

Count Rows In Table Default to 0 Returning to Many Results

I am trying to count the number of rows in a left join table defaulting to zero if there are none.  When I do this the other table filters are no longer applied and I get all the records in the count...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi jharsh ,

    I modify the formula, and it works fine now.

    Show Sales Person in Table = 
    var selectedManager = SELECTEDVALUE(Managers[Manager])
    var currentOffice = SELECTEDVALUE(SalesPeople[Office])
    var employeesManager = LOOKUPVALUE( Offices[Manager], Offices[Office], currentOffice )
    return IF( employeesManager = selectedManager||NOT(ISFILTERED('Managers'[Manager])), 1 )

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

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