The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I am trying to create a plain table in Power BI but I am having trouble figuring out how to add a column based on values from basically two columns. I am getting duplicate rows since the rows are unique so I need to filter them out based on the value in col1.
Let's say I have two columns; col1 and col2
If col1 contains the string "See col2" then I want to show col2,
if col1 does not contain "See col2" then show col1 value.
Thanks for your time.
Br,
Sandra
Solved! Go to Solution.
Hello ,
give this a try
New Column =
IF(
CONTAINSSTRING(Table1[col1], "See col2"),
Table1[col2],
Table1[col1]
)
& " " &
IF(
CONTAINSSTRING(Table1[col1], "See col2"),
"",
DISTINCT(Table1[col1])
)
Regards,
Please consider accepting this as a solution !! Respect your KUDO !!
I appreciate your recognition and feel proud to have been able to assist you.
Hello ,
give this a try
New Column =
IF(
CONTAINSSTRING(Table1[col1], "See col2"),
Table1[col2],
Table1[col1]
)
& " " &
IF(
CONTAINSSTRING(Table1[col1], "See col2"),
"",
DISTINCT(Table1[col1])
)
Regards,
Please consider accepting this as a solution !! Respect your KUDO !!
I appreciate your recognition and feel proud to have been able to assist you.