Forum Discussion
How to Format a Text String as SQL Query
- Anonymous4 years ago
Hi joyhackett,
AFAIK, current power bi does not support formatting T-SQL strings.
In my opinion, I'd like to suggest your enter 'query editor' to add a custom column to invoke the T-SQL string formatting API that processes and store a formatted string into this custom column.Regards,
Xiaoxin Sheng
Hi joyhackett ,
In DAX you can create a calculated column as follows :
This will give you the following result :
I tried a solution using power query but it did not work in the report view.
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂
- joyhackett4 years agoHelper II
Thank you.
Your solution will only work for the sample row that I provided. There are 100 rows of SQL view definitions.
However, I see what you are doing with the line breaks, so this puts me on a possible path.- Anonymous4 years agoNot applicable
Hi joyhackett,
AFAIK, current power bi does not support formatting T-SQL strings.
In my opinion, I'd like to suggest your enter 'query editor' to add a custom column to invoke the T-SQL string formatting API that processes and store a formatted string into this custom column.Regards,
Xiaoxin Sheng