Forum Discussion
SQL VS DAX mental Set
- 6 years ago
My view is you do all *necessary* transformations in SQL, and then write measures in Power BI to do the calculations. You said your team does everything in SQL and avoids measures - that is the difference between the two. My view is you are better to shape the tables in SQL if you have pros that can do this, rather than do it in Power Query. You should generally load the lowest level of detail needed into PBI and do not preaggregate the data (something SQL pros love to do). Hope that is clearer.
This is a huge topic. Power BI (import mode) is a model based tool. You build a model (typically star schema) and write measures that work together with the model to be an extensible reporting tool. The objective is to minimise the need for new queries each time there is a new need. It is not best practice to do the work in SQL and use PBI for visualisation only. In addition, some things cannot be done in queries in SQL. Eg, calculating the % margin for any user selection of products can only be done in a measure.
in my experience, people that take this approach are comfortable with what they know and are yet to embrace the unknown.
I think it is fine (Even preferred) to do any transformations possible in SQL. PQ is there for when that is not possible.