Forum Discussion
How to extract a text in a column in Direct Query mode
Hi LivioLanzo I'm late to the party.
Just curious, is it good idea to pre-popularize the needed calculated columns with SQL query when loading the data into Power BI? I'm still scratching my head to find the positive/negative of using SQL/M to query SQL Server databases.
Sometimes the calculated column can be totally reduntant (like for instance when you already have a Quantity and a Price column and you add a new one with Price * Quantity) or it can be helpful and necessary to speed up your measure (for instance a Workday indicator column in the calendar table).
The best place to add it would be in a view within Sql server, but some people may not have the rights to create views so the second best place is within Power Query, making sure that query folding is taking place
- markus_zhang7 years agoAdvocate III
Got it, thanks LivioLanzo so using view if I have the permission (I don't, alas), or Power Query.