Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
HI everyone.
I want to show Current week as default when user open the report or changes the report page.
I want this slicer to show by default whenever user opens the report or changes the report page. when user come backs to the page it should show the sales by current week.
PFB the dax im using currently to show the current week between the weeks,
Solved! Go to Solution.
Hi @Anonymous
First you need to create a calculated column to return the week number and put the column in slicer to filter data .
week number=
var _number=WEEKNUM('Table'[Date])
var _today=WEEKNUM(TODAY())
return SWITCH(TRUE(),_number=_today,"Current",FORMAT(_number,"####"))
In the formula above , _number is the week number of each date , _today is the week number of today . When _number is equal to _today , you will get the dates belong to current week and return the value with text “current” .
Then create a measure to sum the value .
total value = SUM('Table'[Value])
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
First you need to create a calculated column to return the week number and put the column in slicer to filter data .
week number=
var _number=WEEKNUM('Table'[Date])
var _today=WEEKNUM(TODAY())
return SWITCH(TRUE(),_number=_today,"Current",FORMAT(_number,"####"))
In the formula above , _number is the week number of each date , _today is the week number of today . When _number is equal to _today , you will get the dates belong to current week and return the value with text “current” .
Then create a measure to sum the value .
total value = SUM('Table'[Value])
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , the Issue is not clear.
But you need have start of week
start week = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 //Monday
end date= 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Then you can create a new column like
Week Type = Switch( True(),
WEEKNUM("Datedim"[entrydate] ) = WEEKNUM( TODAY() ),"This Week" ,
WEEKNUM("Datedim"[entrydate] ) = WEEKNUM( TODAY() )-1,"Last Week" ,
[Week Name]
)
Create these in date table and save on this week. As of now you can not default it using a measure/funtion
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |