Forum Discussion

byr10112's avatar
byr10112
Icon for Microsoft Employee rankMicrosoft Employee
4 years ago
Solved

Count Occurrence of Column Values in Another Table

This sounds like a pretty simple request, but I havent been able to find a solution yet. Maybe I'm still thinking from a t-SQL perspective.    I'm trying to find how many times a value in a column ...
  • sevenhills's avatar
    4 years ago
    Measure = 
    var _a = SELECTEDVALUE('Table A'[Skills Name])
    var _b = HASONEVALUE('Table A'[Skills Name])
    var _c = countrows( FILTER('Table B', 'Table B'[Skills Requested] = _a ))
    Return 
    if (_b, if (ISBLANK(_c), 0, _c), BLANK() )

     

    Output: