Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I am looking for a little help to develop a conditional column which would tag the rows I have in my table dependant on what a certain column contains.
Say I have 3 columns and I am looking to develop the 4th column below where the rules are;
If Column "Area" contains 00111 & 00112 then "Both"
If Column "Area" contains 00111 then "00111"
If Column "Area" contains 00112 then "00112"
Else "Check"
See below example,
Name | ID | Area | Result |
A | 1 | 00111 - GGT;00112 - GFT;00113 - GTT | Both |
B | 2 | 00111 - GGT | 00111 |
C | 3 | 00110 - CGT | Check |
D | 4 | 00112 - GFT | 00112 |
E | 5 | 00111 - GGT;00112 - GFT | Both |
F | 6 | 00114 - GHT | Check |
I have attempted a number of formulas (IF statements & also conditional columns) but have not been able to find a suitable fix. It is the "Both" rule that I am struggling with as my approach appears to tag anything containing 00111 or 00112 as "Both" and I cannot find a way to add multiple rules via the conditional column option in transform data.
Any help greatly appreciated.
Thanks,
AB
Solved! Go to Solution.
Hi @AKJB91 ,
Please have a try.
Add a custom column.
if Text.Contains([Area], "00111") and Text.Contains([Area], "00112") then "Both"
else if Text.Contains([Area], "00111") then "00111"
else if Text.Contains([Area], "00112") then "00112"
else "Check"
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello
Can someone help with the below formula, it gives me null everywhere in the column
= Table.AddColumn(#"Renamed Columns3", "Churn flag NEW", each if([Seniority group]="0-1 year" & [Reason for Action]="Termination") then "Churn" else "null")
Hi @AKJB91 ,
Please have a try.
Add a custom column.
if Text.Contains([Area], "00111") and Text.Contains([Area], "00112") then "Both"
else if Text.Contains([Area], "00111") then "00111"
else if Text.Contains([Area], "00112") then "00112"
else "Check"
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
55 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
62 | |
50 | |
46 |