Forum Discussion

kbol's avatar
kbol
Helper I
6 years ago
Solved

Count on Dim Table Based on Fact Table Filtering

Hello, I've got a model like this:   My goal is to count the number of rows in the Projects table that have at least 1 corresponding row in the StaffProj for a given selection of Staff. My a...
  • v-eachen-msft's avatar
    6 years ago

    Hi kbol ,

     

    You could try the following measure.

    Projs With Selected Staff =
    CALCULATE (
        DISTINCTCOUNT ( 'StaffProj'[Project] ),
        ALLSELECTED ( 'Staff'[Name] )
    )
    

    Here is the test result.