Forum Discussion

jonnyA's avatar
jonnyA
Icon for Responsive Resident rankResponsive Resident
5 years ago
Solved

How do I create a measure with filters?

I'm trying to create a measure with filters. For example: my dataset has a "note_Id" and I need to figure out a way to create a measure that has my "Note_ID", but only the Note ID's that have Modife...
  • parry2k's avatar
    5 years ago

    jonnyA I think I used the wrong column in the DAX, try this

     

    Count 95 and GT = 
    CALCULATE ( 
    COUNTROWS ( Table ), 
    Table[Modifier] IN { "95", "GT" } 
    )

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡

  • parry2k's avatar
    5 years ago

    jonnyA wrap it in KEEPFILTERS

     

    Another measure = 
    CALCULATE ( 
    COUNTROWS ( Table ),
    KEEPFILTERS ( NOT ISBLANK ( Table[CPT] ) ),
    KEEPFILTERS ( NOT ISBLANK ( Table[Billed_CPT] ) )
    )

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    ⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡