Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I have this kind of code to generate dates:
DateDimension =
ADDCOLUMNS(
CALENDAR(DATE(2023, 2, 1), DATE(2025, 2, 1)),
"DateKey", FORMAT([Date], "YYYYMMDD"),
"Year", YEAR([Date]),
"Quarter", "Q" & QUARTER([Date]),
"QuarterNo", QUARTER([Date]),
"Month", FORMAT([Date], "mmmm"),
"MonthNo", MONTH([Date]),
"MonthShort", FORMAT([Date], "mmm"),
"WeekNo", WEEKNUM([Date]),
"WeekDay", FORMAT([Date], "dddd"),
"WeekDayNo", WEEKDAY([Date], 2),
"DayOfYear", DATEDIFF(DATE(YEAR([Date]), 1, 1), [Date], DAY) + 1,
"IsWeekend", IF(WEEKDAY([Date], 2) > 5, TRUE, FALSE),
"IsHoliday", FALSE, // You can customize this based on your holiday calendar
"YearMonth", FORMAT([Date], "yyyy-mm"),
"YearQuarter", FORMAT([Date], "yyyy") & "-Q" & QUARTER([Date]),
"FiscalYear", "FY" & IF(MONTH([Date]) > 6, YEAR([Date]) + 1, YEAR([Date])),
"FiscalQuarter", "FQ" & IF(MONTH([Date]) > 6, QUARTER([Date]) - 2, QUARTER([Date]) + 2)
)
This is dax.
I heard from my boss because he read in some article that this is better approach than writing this in power query M code - it is regarding performance and size.
It is true? And why if it yes?
If i will need to read speofic ranges of dates based on specific customer (like read start date, end date) dax will be better or just import them using power query?
Need expertise here please,
Best wishes,
Jacek
Solved! Go to Solution.
Any DAX calculated table and columns are generated at the very end of a refresh. This data will still be compressed.
For calculated tables, the compression should be the same regardless of if the data is from DAX or powerquery.
In the case of calculated columns, there can be a difference. When loading data, vertipak tries to find a sort order to increase run length encoding and maximize compression. The mean you get smaller tables in memory and faster query execution. Calculated columns are calculated after this order has been determining, meaning it may have sub optimal compression.
Thanks, so calculated tables can be a good solution not having affect on general performance.
So it is matter of implementation.
Best,
Jacek
Any DAX calculated table and columns are generated at the very end of a refresh. This data will still be compressed.
For calculated tables, the compression should be the same regardless of if the data is from DAX or powerquery.
In the case of calculated columns, there can be a difference. When loading data, vertipak tries to find a sort order to increase run length encoding and maximize compression. The mean you get smaller tables in memory and faster query execution. Calculated columns are calculated after this order has been determining, meaning it may have sub optimal compression.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
1 |
User | Count |
---|---|
12 | |
4 | |
3 | |
3 | |
3 |