Forum Discussion
ManchevB
Helper II
1 year agoSplitting a column from a PowerBI formula
Hi all, I have this formula here: 7.SkillAvailabilityByCountry = VAR AllCountries = VALUES('Employees'[CountryName]) RETURN ADDCOLUMNS ( 'Skills Data', "Country", ...
- 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
speedramps
Super User
1 year agoWe want to help but please copy and paste sql data into a text table or hand type the data and share it.
You can also share data via OneDrive, Gooledrice or Dropbox.
Dont expect busy helpers to hand type your test data for you. š
We can then immediately import teh data and build a solution.
I appreciate you might be busy and want a rush answer, but we are busy volunteers š
You will get quicker and better answers if you take care and effort into asking questions with example data. š