Forum Discussion

coffjoh2004's avatar
coffjoh2004
Regular Visitor
3 years ago
Solved

Overlapping filters

Hello,

I am writing a measure that needs to exclude certain outage codes, but those outage codes i want excluded need to be used in another part of the same visual, so i'm having troubles with the overlapping of page filters and dax filters. Dax code for the measure is below:

# Future WO's = CALCULATE(count(WORKORDER[WONUM]), filter('Outage Code Bridge', 'Outage Code Bridge'[Outage Code]<>"A2111"||'Outage Code Bridge'[Outage Code]<>"A2221"||'Outage Code Bridge'[Outage Code]<>"A2241"))
 
Each outage code has a pair, and I only want the pair to be included on the page, so for example i have a page filter to only show A2111 and A2411. Ideally, I want this measure only to count A2411 (because i'm excluding A2111 in the dax filter), but the dax filter is overriding the page filter.
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  coffjoh2004 ,

     

    Here are the steps you can follow:

    1. Create measure.

    Future WO's1 =
    CALCULATE(count(WORKORDER[WONUM]),filter('Outage Code Bridge',
    NOT('Outage Code Bridge'[Outage Code]) in {"A2111","A2221","A2241"}))
    Future WO's2 = CALCULATE(count(WORKORDER[WONUM]), filter('Outage Code Bridge', 'Outage Code Bridge'[Outage Code]<>"A2111"&&'Outage Code Bridge'[Outage Code]<>"A2221"&&'Outage Code Bridge'[Outage Code]<>"A2241"))

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • coffjoh2004's avatar
    coffjoh2004
    Regular Visitor

    For context, I have tried making seperate measures for each outage code, and it does work but I want to repeat the same visuals for each outage and that would be alot of measures

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  coffjoh2004 ,

     

    Here are the steps you can follow:

    1. Create measure.

    Future WO's1 =
    CALCULATE(count(WORKORDER[WONUM]),filter('Outage Code Bridge',
    NOT('Outage Code Bridge'[Outage Code]) in {"A2111","A2221","A2241"}))
    Future WO's2 = CALCULATE(count(WORKORDER[WONUM]), filter('Outage Code Bridge', 'Outage Code Bridge'[Outage Code]<>"A2111"&&'Outage Code Bridge'[Outage Code]<>"A2221"&&'Outage Code Bridge'[Outage Code]<>"A2241"))

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly