Forum Discussion
Harry_Tran
5 years agoHelper III
Filter data
Hi everyone, I have a sample table like below. One Invoice can contain multiple Product_ID. What I am trying to do is find the Invoices that contain either 'A' or 'C' AND either 'Z123', 'Z234', or ...
- 5 years ago
Hi, Harry_Tran
You can create a Measure and then create a Table visual.
1 Invoice_meet_requirement =
VAR t =
FILTER (
'Table',
'Table'[Product_ID]
IN { "A", "C" }
|| 'Table'[Product_ID] IN { "Z123", "Z234", "Z345" }
)
VAR num =
COUNTROWS ( t )
RETURN
IF ( num > 1, "Meet the requirement", "DO NOT meet the requirement" )
2 Create a Table with 'invoice' Field and drag 'invoice_meet_requirement' to its visual filter
The result looks like this:
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.