Forum Discussion

Yacine_VC's avatar
Yacine_VC
Frequent Visitor
2 years ago
Solved

How to create a string column out of 3 other string columns

Hello everyone,   I'm having an issue with my PBI model : it's supposed to count the number of people attending to formations. The report is based on an excel file, filled by the trainers. It looks...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Yacine_VC ,

     

    First of all thanks to Tahreem24  for the quick reply and solution. He did a great job solving your initial problem. I have some suggestions for your follow-up questions. If I have misunderstood you, please create a new case, we suggest a case to solve only one problem, because it can get good help and give a better reference for other users!

     

    The recommendations are as follows:

    (1)We can create a table.

    Table 2 = FILTER(DISTINCT(UNION(
        SELECTCOLUMNS('Table',"Tool", 'Table'[Tool 1]),
        SELECTCOLUMNS('Table',"Tool", 'Table'[Tool 2]),
        SELECTCOLUMNS('Table',"Tool", 'Table'[Tool 3]))
    ),[Tool]<>BLANK())

    (2)We can create a measure.

    Measure = COUNTROWS(FILTER(ALLSELECTED('Table'),[Tool 1] in VALUES('Table 2'[Tool]) || [Tool 2]in VALUES('Table 2'[Tool]) || [Tool 3] in VALUES('Table 2'[Tool])))

     (3) Then the result is as follows.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.