Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 the calculated column
//tksnota
Solved! Go to Solution.
Hi @tksnota
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.
Hi @tksnota, hello Ashish_Mathur and muhammad_786_1, thank you for your prompt reply!
Please try as follows:
CalculatedColumn =
SWITCH(
TRUE(),
-- condition2
Table1[SalesGroup] = "IC",
"IC",
-- condition1: SalesGroup <> IC and Type2 =Sales, use GLAccount, Costcenter, CostUnit and Project from Table2 to search ItemCode
Table1[Type2] = "Sales" && Table1[SalesGroup] <> "IC",
LOOKUPVALUE(
Table2[ItemCode],
Table2[GLAccount], Table1[GL_Cod],
Table2[Costcenter], Table1[Cost_Center],
Table2[CostUnit],Table1[Profit_Center],
Table2[Project], Table1[Project]
),
-- condition3: SalesGroup <> IC and Type2 = COGS,return New Consol
Table1[Type2] = "COGS" && Table1[SalesGroup] <> "IC",
Table1[New Consol],
-- default
BLANK()
)
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share data in a format that can be pasted in an MS Excel file. Show the expected result there.
Hi @tksnota
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.
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
44 | |
41 | |
39 | |
36 |