Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to group tickets into product category based on comparing one table to another. The match on ticket type from one table to another isn't exact. It's more like if the ticket string string in Table 1(AA0765AA) contains a part of the one in Table 2 (765), then that will be classified as Bananas. It's not an exact comparison. The output table will look like this.
I suppose CONTAINSSTRING will work. However I can't seem to get the syntax right. I'm trying group Table 1 into Type and do some analysis. Can someone help me with this please? Model here.
Thanks in advance,
AM
Solved! Go to Solution.
hi @amani1980 ,
try to extract the numbers from the string
1) in Power Query, how:
https://monocroft.com/extract-numbers-from-a-string-in-power-bi/
2) If you insist to do it with DAX code and supposing the dataset is as uniform as we see in the sample, you can try to write a calculated column with DAX like:
ticket=
VALUE(MID(table1[Ticket No], 4, 4))
then try to join with table2 and use RELATED to get the type column.
Use Power Query and in the merge command check the fuzzy merging as highlighted below
hi @amani1980 ,
try to extract the numbers from the string
1) in Power Query, how:
https://monocroft.com/extract-numbers-from-a-string-in-power-bi/
2) If you insist to do it with DAX code and supposing the dataset is as uniform as we see in the sample, you can try to write a calculated column with DAX like:
ticket=
VALUE(MID(table1[Ticket No], 4, 4))
then try to join with table2 and use RELATED to get the type column.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |