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
I am having problems creating a calculated column based on a column in a different table using the 'contains' function. I either get an error or '[List]'. I want to create a field in tablea that is based on values from fields in tablea and tableb. tablea and tableb are joined on a many to one relationship.
tablea *:1 tableb
I want something along the lines of:
if contains(tableb[field1], "x") then "new"
else tablea[field1]
endif
With the result to look like the image below:
Any help will be greatly appreciated
Thanks!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Newfield CC =
IF ( CONTAINSSTRING ( RELATED ( Tableb[field1] ), "x" ), "new", Tablea[field1] )
Thank you!
Hi,
Please check the below picture and the attached pbix file.
Newfield CC =
IF ( CONTAINSSTRING ( RELATED ( Tableb[field1] ), "x" ), "new", Tablea[field1] )
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |