Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filter Out All Rows Based On Criteria

Hello!

 

I have a dataset with the following three fields: Product, Warehouse, and Status. Below is an example of what this looks like.

ProductWarehouseStatus
ABCCA1
ABCNY2
ABCTX3
JKLCA1
JKLNY1
JKLTX2
XYZCA1
XYZNY1
XYZTX1

 

Each product can have a different status at each warehouse. I would like to identify all products that are only in status '1'. Simply filtering on the report would give me this table:

ProductWarehouseStatus
ABCCA1
JKLCA1
JKLNY1
XYZCA1
XYZNY1
XYZTX1

 

I don't want to see products 'ABC' or 'JKL' because they are a different status in the warehouses that were filtered out. I only want to see product 'XYZ' because it is only status '1' in every warehouse. Is this possible to filter like this?

 

Thank you!

  • Anonymous ,  Try this measure

     

    Measure =

    var _overall = countx(filter(allselected(Table), Table[Product] = max(Table[Product] ) ), Table[Product] )

    var _st1= countx(filter(allselected(Table), Table[Product] = max(Table[Product] ) && [Status]= 1), Table[Product] )

    return

    if(_st1= _overall , Max(Table[Status]), Blank() )

1 Reply

  • Anonymous ,  Try this measure

     

    Measure =

    var _overall = countx(filter(allselected(Table), Table[Product] = max(Table[Product] ) ), Table[Product] )

    var _st1= countx(filter(allselected(Table), Table[Product] = max(Table[Product] ) && [Status]= 1), Table[Product] )

    return

    if(_st1= _overall , Max(Table[Status]), Blank() )