Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |