Forum Discussion

tloF2D5U9E5's avatar
tloF2D5U9E5
Regular Visitor
8 years ago
Solved

Direct Query - Measure that applies filters like a slicer

Is there a way to create a measure that applies filters in direct query in the same way as a slicer? I have found that the SQL generated from a CALCULATE statement is different from the SQL generated...
  • tloF2D5U9E5's avatar
    8 years ago

    Okay,  I figured it out. You have to apply the filter statement like this:

    filter(Ledger,
    related(AccountTable[Accounts])="100" || 
    related(AccountTable[Accounts])="101" || 
    related(AccountTable[Accounts])="102"
    )

    Seems clunky... if anybody knows a more efficient way, I'd be interested to hear it!