cancel
Showing results for
Did you mean:
Post Prodigy

## Calculated Column

Hi there ;

on the below chart i have two  order number and have 3 lines with details .I want to create a column whic one's name is "OTIF ORDER" and colour is yellow

Formula rule will be :

•  if even one cell is " Not OTIF " under " OTIF ITEM" column , then write to all  OTIF ORDER " column for an order      "  Not OTIF "
• if an order's all lines is  "OTIF"  under "OTIF ITEM"  column then write to to all  " OTIF ORDER " column for an order " OTIF "

Thanks in

1 ACCEPTED SOLUTION
Solution Sage

Indicator =
CALCULATE(
SELECTEDVALUE('Table'[OTIF ITEM],"No OTIF"),
ALLEXCEPT('Table','Table'[Order No])
)

Let's explain how this works ....

The default row context is  Order no, item No and OTIF ITEM

CALCULATE overrides the default row context with ALLEXCEPT Order no.
This drops the Item No and OTIF ITEM default row filters and will process all the rows for the Order no.

The SELECTEDVALUE will return OTIF ITEM value is there is just one value for the  Order no.,
otherwise it will return “No OTIF”.

Hope you understand my explanation.

Remember we are BI community volunteers so please click the thumbs-up for me taking the trouble to help you and then accept the solution if it works.  Thank you !

2 REPLIES 2
Post Prodigy

it is ok @speedramps  , thanks

Solution Sage

Indicator =
CALCULATE(
SELECTEDVALUE('Table'[OTIF ITEM],"No OTIF"),
ALLEXCEPT('Table','Table'[Order No])
)

Let's explain how this works ....

The default row context is  Order no, item No and OTIF ITEM

CALCULATE overrides the default row context with ALLEXCEPT Order no.
This drops the Item No and OTIF ITEM default row filters and will process all the rows for the Order no.

The SELECTEDVALUE will return OTIF ITEM value is there is just one value for the  Order no.,
otherwise it will return “No OTIF”.

Hope you understand my explanation.

Remember we are BI community volunteers so please click the thumbs-up for me taking the trouble to help you and then accept the solution if it works.  Thank you !

Announcements

#### Launching new user group features

Learn how to create your own user groups today!