7 Replies Latest reply on Dec 14, 2017 4:46 AM by Zhouyi Zhang

# Treat all the records, of the same Order No as "E" as long as one record is "E"

hi,

Here's an example

I have a Order Number (7 records) with status of E or Blank.

 Order No Status 201715598907 E 201715598907 201715598907 E 201715598907 201715598907 201715598907 E 201715598907

As long as 1 record has a "E" meaning exception, I want to treat all the records, of the same Order No

as "E" as well instead of blank (no exception)

How do I accomplish this in Tableau?

rgds,

robinson

• ###### 1. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

Robinson,

Is there a reason why there are multiple records for the same order number with different Statuses?

• ###### 2. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

hi,

This is actually order line with parts

rgds,

robinson

• ###### 3. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

Hi, Robinson

Please find my solution attached. below is the sample result

Hope this could help

ZZ

2 of 2 people found this helpful
• ###### 4. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

thanks very much zhou yi.

This is what I am looking for.

btw, if E & Blank is Y and N respectively and I want to have it as "P"

if there is at least one Y?

rgds,

robinson

• ###### 5. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

Hi, Robinson

To your question, you can try to modify the calculation as below to get whatever status as the overall status.

ZZ

• ###### 6. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

thanks very much.

Actually (see below), if an order(123) has mixed status(Y and N)

set it to "M".

If it is not mixed, i.e. all Ys or Ns, it should be Y or N accordingly.

 Order No Parts Status 123 42338412 Y 123 42338412 Y 123 42338412 Y 123 42527463 Y 123 42527463 Y 123 42527435 Y 123 42527438 Y 123 42338411 N 123 42338418 N

rgds,

robinson

• ###### 7. Re: Treat all the records, of the same Order No as "E" as long as one record is "E"

Hi, Robinson