Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Creating Calculated Tables For 3 Different Conditions

  Condition 2: If Sales Group from Table 1 is IC then calculated column will be IC.   Condition 3: From Table 1, if Sales Group is not IC and Type2 is COGS then copy Data from New Consol in ...
  • muhammad_786_1's avatar
    1 year ago

    Hi Anonymous 

     

    Try this:

    CalculatedColumn = 
    IF(
        Table1[SalesGroup] = "IC", 
        "IC",  -- Condition 2
        IF(
            Table1[Type2] = "Sales", 
            LOOKUPVALUE(Table2[ItemCode], Table2[SalesGroup], Table1[SalesGroup]),  -- Condition 1
            IF(
                Table1[Type2] = "COGS", 
                FORMAT(Table1[New Consol], "NA"),  -- Condition 3
                BLANK()  
            )
        )
    )

     

    Best,
    Muhammad Yousaf

     

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

     

    LinkedIn