Forum Discussion

Irwin's avatar
Irwin
Icon for Helper IV rankHelper IV
4 years ago

If statement that checks for value with a condition/filter from another column

Hi guys,

 

I have a dataset (column A) ranging from "blank,0-50'ish" (whole numbers). I have created a calculated column, like below, that checks if the data is, blank, between 0-10 or above 10. Here 1-10 is accepted and 10+ is bad

 

I would like to check this with my material numbers in column B as for some materials I need to lower the accepted limit to 0-5.

Material 1 and 3 has accepted ranges from 1-10, where material 2 and 4 has 1-5

 

How would I go about adding a filter or some other addition to my measure that can check if the material is 1, 3 or 2, 4 ?

 

Quality (0,1,2) =
IF (
      ISBLANK('Table'[column A]), 
      0,
      IF ('Table'[column A] <= 10, 1,  IF ( 'Table'[column A] > 10, 2, BLANK () ) )
)
 
Thank you for all help. Much appreciated.
 

2 Replies

  • " I have created a calculated column"

    "... other addition to my measure ..."

    That seems inconsistent. Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Irwin ,

     

    Sorry, not very clear. Can you provide some sample data and expected results with me?

    Please pay attention to hiding private data.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.