Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

FIND - using more than one

Hi,

 

The below measure sums [Charged_Hrs] only when  'ClientsList'[ClientMH3Name] = "HSE Cover".

 

How do I modify this to sum [Charged_Hrs] only when  'ClientsList'[ClientMH3Name] = "HSE Cover" 

 

OR

 

'ClientsList'[USER5] = "HSE Cover"

 

 

 

Cover Hrs =
CALCULATE (
    CALCULATE (
        CALCULATE (
            SUM ( vw_ShowChargesAndPayForVisits[Charged_Hrs] ),
            FILTER ( 'ClientsList', FIND ( "HSE Cover", 'ClientsList'[User5],, 0 ) ),
            FIND ( "HSE Cover", 'ClientsList'[ClientMH3Name],, 0 )
        ),
        USERELATIONSHIP ( 'Year'[Year], vw_ShowChargesAndPayForVisits[Year] )
    ),
    USERELATIONSHIP ( 'Week'[Week], vw_ShowChargesAndPayForVisits[Weeks] )
)

  • v-diye-msft's avatar
    v-diye-msft
    7 years ago

    Hi Anonymous ,

     

    If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

     

    Best regards,

    Dina Ye

3 Replies

  • v-diye-msft's avatar
    v-diye-msft
    Community Support

    Hi Anonymous 

     

    Please use the formula below instead:

    Cover Hrs =
    CALCULATE (
        CALCULATE (
            CALCULATE (
                SUM ( vw_ShowChargesAndPayForVisits[Charged_Hrs] ),
                FILTER (
                    ClientsList,
                    FIND ( "HSE Cover", 'ClientsList'[User5],, 0 )
                        || FIND ( "HSE Cover", 'ClientsList'[ClientMH3Name],, 0 )
                ),
                USERELATIONSHIP ( 'Year'[Year], vw_ShowChargesAndPayForVisits[Year] )
            ),
            USERELATIONSHIP ( 'Week'[Week], vw_ShowChargesAndPayForVisits[Weeks] )
        )
    )

    Best regards,

    Dina Ye

    • v-diye-msft's avatar
      v-diye-msft
      Community Support

      Hi Anonymous ,

       

      If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

       

      Best regards,

      Dina Ye

      • Anonymous's avatar
        Anonymous
        Not applicable

        Works great. TY.