Forum Discussion

JLemaire's avatar
JLemaire
Frequent Visitor
2 years ago
Solved

Conditional Filtering

I'm trying to filter a page (or something I can apply to every viz).    The general structure of my two tables are:   P Dollars     Customer Prod GP Out abc Com 35 bac Dev 10 ...
  • vicky_'s avatar
    2 years ago
    Keep Row = 
    var selectedProdGP = SELECTEDVALUE('Table'[Prod GP])
    var selectedIn = SELECTEDVALUE('Table'[In])
    var selectedOut = SELECTEDVALUE('Table'[Out])
    return INT(
        (selectedProdGP = "Serv" && (selectedIn >= 15 || selectedOut >= 15)) ||
        (selectedProdGP <> "Serv" && (selectedIn >= 35 || selectedOut >= 35)) 
    )

    The above is the measure that I came up with - you can place that measure in the filters pane and either keep those that are Keep Row = 1.