cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Which is the best way to create a Calendar Table, using DAX or Power Query? and why?

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!! 

1 ACCEPTED SOLUTION
Viz_female
Helper V
Helper V

@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

View solution in original post

5 REPLIES 5
Icey
Community Support
Community Support

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.

SushainKoul
Helper III
Helper III

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.

mohammedadnant
Responsive Resident
Responsive Resident

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

Viz_female
Helper V
Helper V

@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

View solution in original post

Anonymous
Not applicable

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!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!