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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
People,
My fact table have no Date column , i just have the Year and Week number columns,
there any way to use DAX to dicovery the month of this combination (Year + week number) ?
I know, some times we have a week num existing in 2 months... but if is possible to choose the month when de weekstarts, could be good...
Thanks
Solved! Go to Solution.
The easiest way would be to just create a new date table using CALENDARAUTO() and add a column for weeks, then join the two / create a relationship between them. If you're worried about one week having two months, take a look at the ISO Weeks functions here, which should help you pick the starting day for each week.
hi @zenga
you would
1) need a DataTable to help you, e.g. like this:
DateYearWeekNumberMonth
| 1/31/2022 | 2022 | 6 | 1 |
| 2/1/2022 | 2022 | 6 | 2 |
| 4/30/2022 | 2022 | 18 | 4 |
| 5/1/2022 | 2022 | 19 | 5 |
2) add a column in your FactTable like this:
Month =
VAR _year = [Year]
VAR _wn = [WeekNumber]
RETURN
MINX(
FILTER(
DateTable,
DateTable[Year] = _year
&&DateTable[WeekNumber] =_wn
),
DateTable[Month]
)
i tried an it worked like this:
BTW, if you can, for date calculation, try always to have a date column in fact table connected to a decent date table.
hi @zenga
you would
1) need a DataTable to help you, e.g. like this:
DateYearWeekNumberMonth
| 1/31/2022 | 2022 | 6 | 1 |
| 2/1/2022 | 2022 | 6 | 2 |
| 4/30/2022 | 2022 | 18 | 4 |
| 5/1/2022 | 2022 | 19 | 5 |
2) add a column in your FactTable like this:
Month =
VAR _year = [Year]
VAR _wn = [WeekNumber]
RETURN
MINX(
FILTER(
DateTable,
DateTable[Year] = _year
&&DateTable[WeekNumber] =_wn
),
DateTable[Month]
)
i tried an it worked like this:
BTW, if you can, for date calculation, try always to have a date column in fact table connected to a decent date table.
The easiest way would be to just create a new date table using CALENDARAUTO() and add a column for weeks, then join the two / create a relationship between them. If you're worried about one week having two months, take a look at the ISO Weeks functions here, which should help you pick the starting day for each week.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |