Forum Discussion

gduobaite's avatar
gduobaite
Helper III
5 years ago
Solved

Inside filter

Hello,    How can I put inside a filter? I have a few different Event Names and I need to do Clicks' calculations for all of them seperately.    DAX I have now:   Clicks = var_table=SUMMARIZ...
  • Fowmy's avatar
    5 years ago

    gduobaite 

    Please try your measure like this:

    Clicks =
    var _name = SELECTEDVALUE('table1'[Event Name])
    var _table = 
    SUMMARIZE(
        'table1', 
        'table1'[Doctor], 
        'table1'[Date time], 
        "name", CALCULATE( DISTINCTCOUNT('table1'[Doctor]), 'table1'[Event Name] = _name)
    )
    return
    SUMX(_table,[name])

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn