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
Hi everyone,
1st week (wednesday) of Every month data should reflect last months data. For eg: First week is October 5th( wednesday) and the data should reflect last month september data. Till October 4th it should show August data only. The same should be applied for entire year. Can anyone help me with the DAX.
Solved! Go to Solution.
Assuming this based on today and you need full month data
var _mo = eomonth(today(), -1) +1
var _wed = _mo - Weekday(_mo,2) +3
var _final = if(_web<_mo, _wed +7, _wed)
return
if(day(_wed) <5, calculate(Sum(Table[Value]), filter(Table, Eomonth(Table[Date],0) =eomonth(today(), -2)) ),
calculate(Sum(Table[Value]), filter(Table, Eomonth(Table[Date],0) =eomonth(today(), -1)) ) )
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
In order to create a calculated column that suits your business requirement is to author a calculated column like below inside the calendar table.
New Month-Year CC =
VAR _currentcalendarmonthyear = 'Calendar'[End of Month]
VAR _startingwednesday =
MINX (
FILTER (
'Calendar',
'Calendar'[End of Month] = _currentcalendarmonthyear
&& 'Calendar'[Day Name] = "Wednesday"
),
'Calendar'[Date]
)
RETURN
IF (
'Calendar'[Date] >= _startingwednesday,
'Calendar'[Month-Year],
FORMAT('Calendar'[Start of Week], "mmm-yyyy")
)
Assuming this based on today and you need full month data
var _mo = eomonth(today(), -1) +1
var _wed = _mo - Weekday(_mo,2) +3
var _final = if(_web<_mo, _wed +7, _wed)
return
if(day(_wed) <5, calculate(Sum(Table[Value]), filter(Table, Eomonth(Table[Date],0) =eomonth(today(), -2)) ),
calculate(Sum(Table[Value]), filter(Table, Eomonth(Table[Date],0) =eomonth(today(), -1)) ) )
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 |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 5 | |
| 3 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 18 | |
| 12 |