Forum Discussion
Splitting a column from a PowerBI formula
- 1 year ago
ManchevB
You may try genreating the above table and spliting the column CountriesWithoutSkill into rows using Power Query:let AllCountries = List.Distinct(Employees[CountryName]), Source = #"Skills Data", AddCountry = Table.AddColumn( Source, "Country", each let skill = [SkillName], countries = List.Distinct(Table.SelectRows(Employees, (r) => r[SkillName] = skill)[CountryName]) in Text.Combine(List.Sort(countries), ", ") ), AddCountriesWithoutSkill = Table.AddColumn( AddCountry, "CountriesWithoutSkill", each let selected = if [Country] = "" then {} else Text.Split([Country], ", "), diff = List.Difference(AllCountries, selected) in Text.Combine(List.Sort(diff), ", ") ), TransformColumn = Table.TransformColumns(AddCountriesWithoutSkill, {{"CountriesWithoutSkill", each Text.Split(_, ", "), type list}}), ExpandCountriesWithoutSkill = Table.ExpandListColumn(TransformColumn, "CountriesWithoutSkill") in ExpandCountriesWithoutSkill
We want to help you but your description is too vague. Please write it again clearly.
Please DON'T copy & paste your DAX that does not work and expect us to fathom what you want to do. That is a bit crazy. āā
Also DON'T proudly explain what you have done ok, just explain the problem, Otherwisie it is confusing,
Please DO give a simple non technical functional description of what you want, then let us suggest the solution. Thank you.
Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
Remove any unneeded columns which may cause confusion.
Rename columns to user friendly names. Avoid your business or system jargon that we may not understand.
Also provide the example desired output, with a clear step-by-step description of calculations the process flow.
Remember not to share private data ... we don't want you to get into trouble. āā
Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
Try keep it simple and ask one question per ticket.
You will get a quick response if you put time, care and effort into writing clear problem descriptions with example data.
Look forward to helping you when the above information is forthcoming š