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.
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.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
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,
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.