Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have been looking at similar questions, but I havent seen any solid answer, I know how to create a Calendar Table using DAX or Power Query, but I don't really know in what situations should I use one or the other.
Hope you can help me guys!!
Solved! Go to Solution.
@Anonymous ideally your solution is to pickup based on the size of the data.
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
Thanks
Hi, in big picture what works better for you, is the best. But I would say DAX, because you will have more control over it and in any case as your project grows you'll need dax functions to expand your calendar with new column etc.
There is one exception though, if your company has a specific calendar in its database, put that as your start point:
This is great video to all you need in calendar with dax also:
https://www.youtube.com/watch?v=Oq5WOmo94_Q
Hi @Anonymous ,
It is hard to say which is better. For many scenarios they are similar. It depends on the your requirements to choose which method. So, it might not be different to use Power Query or DAX for it.
However, there is a big difference. Power Query can fetch data from live web APIs. This functionality gives you the power to fetch public holidays live from an API. You cannot do this with DAX! Apart from this big difference, majority of other requirements can be done with both.
Reference:
Creating Calendar Table in Power BI using DAX Functions - RADACAD;
Create a Date Dimension in Power BI in 4 Steps - Step 1: Calendar Columns - RADACAD.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I would suggest u to first everything from the source but in case u are not able to achieve that then I would suggest u to go for DAX approach as it is the easiest of all as follows:
One of the easiest ways of creating a calendar table is using Calendar() function in DAX. The Calendar function is a very simple function with just two input parameters; start date, and end date.
<table output>=Calendar(<start date>, <end date>)
The output of the Calendar function is a table with one column which includes all dates between the start and end date, with one day at each row.
Hope this answers your query.
Hi @Anonymous
Ideally, best practice is to get everything from the source, if not from Power Query, if not then from DAX,
So, as per your choice, I perfer to do it in Power Query rather than DAX
Thanks & Regards,
Mohammed Adnan
https://www.youtube.com/c/taik18
@Anonymous ideally your solution is to pickup based on the size of the data.
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
Thanks
Every answer in this thread is right, however, the impact seems to rely on the size of the data.
The video in the provided link explains this perfectly.
The use of Power Query or DAX depends on the scenario and functionality you need.
Thanks everyone!
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |