Forum Discussion

jwang14's avatar
jwang14
New Member
2 years ago
Solved

How to split a column using a delimiter in direct query

I'm using direct query mode and I'm wondering if there's a way to use a calculated column to split a column by a delimiter (creating a measure would crash my visual).
For example, I have a name column with sample data like (John; Snow). I want to split the name by the delimiter ";". Thanks

  • Hi jwang14 - Split the column when you are using direct query mode it is best to prefer to handle the transformation in the SQL data source, you can modify your SQL query to split the column. This approach depends on the SQL dialect of your data source. it is not suggestable on creating calculated columns directly in Power BI might not be feasible due to performance issues

     

    Hope it works on doing the changes in sql itself instead of after extracting the data to power query or dax calculated column approach.

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

1 Reply

  • Hi jwang14 - Split the column when you are using direct query mode it is best to prefer to handle the transformation in the SQL data source, you can modify your SQL query to split the column. This approach depends on the SQL dialect of your data source. it is not suggestable on creating calculated columns directly in Power BI might not be feasible due to performance issues

     

    Hope it works on doing the changes in sql itself instead of after extracting the data to power query or dax calculated column approach.

     

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!