Forum Discussion

Saxon10's avatar
Saxon10
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

IF AND statement from one table to another table

  I have a two tables are data and report.   In data table the following columns are A,B,C and status.   In report table the following columns are A,B and C.   In report table, I am trying to ...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, Saxon10 

    I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file's link down below for creating a new column.

     

     

    Status CC =
    VAR conditions =
    MINX (
    FILTER (
    Data,
    Report[A] <= Data[A]
    && Report[B] <= Data[B]
    && Report[C] <= Data[C]
    ),
    Data[A] + Data[B] + Data[C]
    )
    RETURN
    IF (
    CALCULATE (
    MAX ( Data[STATUS] ),
    FILTER ( data, Data[A] + Data[B] + Data[C] = conditions )
    )
    = BLANK (),
    "X",
    CALCULATE (
    MAX ( Data[STATUS] ),
    FILTER ( data, Data[A] + Data[B] + Data[C] = conditions )
    )
    )
     
     
     
     

    Hi, My name is Jihwan Kim.


    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM