Forum Discussion
PowerBI breaking a table from formula
- 1 year ago
I managed to split the table CountriesWithoutSkill into a new column and then applied page filters to see only what is relevant
Hi ManchevB ,
It looks like the issue is that your CONCATENATEX function is combining all countries into a single line, but you want each country listed separately, presumably one per row.
To achieve this, you don’t need to use CONCATENATEX at all, as it is meant for combining values into a single text string. Instead, you can create separate tables or adjust your data model.
Here’s a solution:
Modify Your DAX to Create Separate Rows
SkillsCountriesTable =
SELECTCOLUMNS(
CROSSJOIN(
VALUES('Skills Data'[SkillName]),
VALUES('Employees'[CountryName])
),
"SkillName", 'Skills Data'[SkillName],
"Country", 'Employees'[CountryName],
"HasSkill",
IF(
'Employees'[CountryName] IN
CALCULATETABLE(
VALUES('Employees'[CountryName]),
'Skills Data'[SkillName] = EARLIER('Skills Data'[SkillName])
),
"Yes",
"No"
)
)
Please mark this post as solution if it helps you. Appreciate Kudos.
Thanks for the suggestion, I am aiming to have 3 columns:
in CountryWithSkill - to have each country separately and not in 1 line
in CountriesWithoutSkill - to have each country separately and not in 1 line ( these are the countries that doesn't have that skill )
in CountriesWithSkill - to have each country separately and not in 1 line ( these are the countries that also have the respective skill )