Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I need to create a model with calendar which will let me to make calculations based on working days only. I saw few methods to do this in Dax which are pretty simple and Some sophisticated code in M. What is the best practice in this case?
Thanks a lot.
Rita
Solved! Go to Solution.
Hey @Ritaf ,
basically it's a good idea to create tables in Power Query / M as tables/columns that are created in DAX will suffer some disadvantages. These disadvantages are described in this article:
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
There is an important topic that is not mentioned in the above article and that is the "portability" to a dataflows, providing reusability throughout your company.
Personally I start with "DAX", due to the following
When I'm done (for the 1st iteration) I port my DAX to M.
Hopefully this provides some ideas.
Regards,
Tom
Hey @Ritaf ,
I guess most of us are creating the Calendar table using DAX, and just a few of us have that much rows inside their Power BI SSAS tabular (on-premises / cloud basesd) data models that the points from first post have to be considered.
For this I would recommend that you should use DAX until you feel comfortable using DAX, and then start using M, to avoid unnecessary confusion.
From my point of view, there is no such thing as a gentle introduction into the world of M (beyond point and click).
My favorite books about Power Query / M are:
These blogs are a wealth of wisdom (but maybe not that easy):
This blog has a lot to offer, without a special order
I guess this will keep you from getting bored during the upcoming holidays 🙂
Regards,
Tom
Hey @Ritaf ,
basically it's a good idea to create tables in Power Query / M as tables/columns that are created in DAX will suffer some disadvantages. These disadvantages are described in this article:
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
There is an important topic that is not mentioned in the above article and that is the "portability" to a dataflows, providing reusability throughout your company.
Personally I start with "DAX", due to the following
When I'm done (for the 1st iteration) I port my DAX to M.
Hopefully this provides some ideas.
Regards,
Tom
Hi ,
Thank you for your explanations.
Eventually ia did it on dax, because of lack of M knowledge, it just didn't work in other way.
May be you have a recomendation of course / book/ guide of M language.
Today i am able to use only functions with "buttons" without writing code.
Hey @Ritaf ,
I guess most of us are creating the Calendar table using DAX, and just a few of us have that much rows inside their Power BI SSAS tabular (on-premises / cloud basesd) data models that the points from first post have to be considered.
For this I would recommend that you should use DAX until you feel comfortable using DAX, and then start using M, to avoid unnecessary confusion.
From my point of view, there is no such thing as a gentle introduction into the world of M (beyond point and click).
My favorite books about Power Query / M are:
These blogs are a wealth of wisdom (but maybe not that easy):
This blog has a lot to offer, without a special order
I guess this will keep you from getting bored during the upcoming holidays 🙂
Regards,
Tom
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |