Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
fcaveiro
Frequent Visitor

Newbie Question - Date Table in Power Bi, DAX or M ?

Hello everyone

 

I'm starting in Power BI and i have this "simple" question 

If i need to create a Data Table in Power BI, whats is the best aproach?

Use Dax ou User PowerQuery/M

I've created 2 PBIX files, one for DAX and another to M, they are almost equal using Vertipaq in DAX Studio.

Can anyone diferences in performance or storage? and best aproach in real world projects.

 

Thanks in advance.

 

Fausto Caveiro 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

I recommend M/Power Query. It is recognized as imported data by DAX and has good compression. It can be fully dynamic as well, adding years as your data increases over time, and removing earlier years if you don't want to keep history forever. For example, last 5 years or whatever. See my blog on how to do this.

 

Creating a Dynamic Date Table in Power Query

 

If you use DAX, I recommened a calculated table, not a table with calculated columns. The latter will not perform as well.

In general, try to avoid calculated columns. There are times to use them, but it is rare. Getting data out of the source system, creating columns in Power Query, or DAX Measures are usually preferred to calculated columns. See these references:
Calculated Columns vs Measures in DAX
Calculated Columns and Measures in DAX
Storage differences between calculated columns and calculated tables



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

I recommend M/Power Query. It is recognized as imported data by DAX and has good compression. It can be fully dynamic as well, adding years as your data increases over time, and removing earlier years if you don't want to keep history forever. For example, last 5 years or whatever. See my blog on how to do this.

 

Creating a Dynamic Date Table in Power Query

 

If you use DAX, I recommened a calculated table, not a table with calculated columns. The latter will not perform as well.

In general, try to avoid calculated columns. There are times to use them, but it is rare. Getting data out of the source system, creating columns in Power Query, or DAX Measures are usually preferred to calculated columns. See these references:
Calculated Columns vs Measures in DAX
Calculated Columns and Measures in DAX
Storage differences between calculated columns and calculated tables



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi Edhans

 

Many many thanks for you fast answer!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors