Power BI: match values between 2 columns then concatenate
In IT, particularly in the incident management, we have a parent column, something like that:

The “number” column has unique values but the “parent” one contains duplicates. To know if “number” is in “parent”, I will match them. I will add a new column:

Then put this formula:
IF(NOT(ISBLANK(LOOKUPVALUE('table'[argument1],'table'[argument1],'table'[argument2]))),"value")

NOTE: change table, argument1, argument2 and value by yours
Alternatively, I can use this formula if the one above is not working with your data:
var num=[argument2] return IF(COUNTROWS(FILTER('table',CONTAINSSTRING('table'[argument1],num)))>0,"value")

Next, I want to get a list of number tickets that share the same ID in the “parent” column. In fact, I will concatenate the “number” column based on the value in the “parent” one, again, I will need to match the values between those 2 columns in order to get it with this formula:
var num=[argument1] return IF(NOT(ISBLANK(num)),CONCATENATEX(FILTER('table','table'[argument1]=num),'table'[argument2]," "))

NOTE: to separate the ticket number, for instance, by a coma instead of a space, change " " by ","

NOTE: for the column 3 to know how many tickets, read Power BI: count number of characters/letters/words using a column
I have all the information I need so I can stop here but let’s go a little further. I need to have the results of the column 3 to be in the same row as the matching value of the “number” column. To do that, I will create another table:

To extract the unique values of the “parent” column:

NOTE: for more information, read Power BI: extract columns from a table to another one
Next, I will add a column to get the list:

NOTE: for more information, read Power BI: combine words based on criteria
Now, to make appear the list in the table1, either I will use:
- The LOOKUPVALUE function (no relationship)
- Or the RELATED function (relationship)
In both cases, it will be the same result:

Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...
-
Refresh Power BI
From the Power BI Service, I can set refresh but, for instance, there is no option to do it monthly or each time a change is made...
-
Power BI alerts to be sent by email from an excel file based on condition
I will explain how to send a list of emails from an excel file after creating alerts...