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.
Hi All!
I have a column with dirty data - lets call it ddColumn. Some of the Rows in the ddColumn contain product groups.
I would like to have a calculated column with the name of the product group - if found - and if not, just a blank value.
The product groups can be found in a product details table. The table with ddColumn has no relation to the product details table.
In a simplified way I thought it could look something like this:
if([productgroup] found in [ddColumn], return this [product group], "")
In dax i thought it could look something like this. But since a Column cant be used for search I do only get error.
If(Search('productdetails'[productGroup], [ddColumn], 1, Blank())>0, 'productdetails'[productGroup], Blank())
I hope someone of you might have a good solution for this.
Thanks in advance!
Solved! Go to Solution.
please try
Calculated Column =
MAXX (
FILTER (
VALUES ( Products[Group] ),
CONTAINSSTRING ( Table1[ddcolumn], Products[Group] )
),
Products[Group]
)
please try
Calculated Column =
MAXX (
FILTER (
VALUES ( Products[Group] ),
CONTAINSSTRING ( Table1[ddcolumn], Products[Group] )
),
Products[Group]
)
Thanks alot @SpartaBI for your answer.
Is this enough or do you need more data?
Table1:
ddColumn
abcdSmartphone_content |
content2022share |
.1-1laptop |
Smatphonetestdata |
1-y.2,laptopas |
product details table:
product group
Smartphone |
Tablet |
Laptop |
Camera |
desired output:
Table1:
ddColumn Calculated Column
abcdSmartphone_content | Smartphone |
content2022share | |
.1-1laptop | Laptop |
Smatphonetestdata | Smartphone |
1-y.2,Laptopas | Laptop |
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 |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |