Forum Discussion
Start horizontal scroll from current week
Hi All, I have a matrix where my values are being showed on rows and on columns I have weekly dates which range from June to December and would still go ahead than that as well.
My problem is that Everytime my report is opened the matrix would show me the dates from June, while this is ok as the current week is still being visible in the canvas, it would be a problem when my current week is further to the right and I always have to scroll to view that. What I am interested in is that whenever I open my report it should start from the current week. That way I have a liberty of scrolling to the left to view historical dates and if I scroll further right I can see my future dates.
I am not too sure if this is possible in Power BI, but if yes, then can someone please point a way out of it for me.
7 Replies
- amitchandakSuper User
Anonymous , Have a column like this in Date and week calendar
Week Type = Switch( True(),
[start week]<=Today() && [end date]>=Today(),"This Week" ,
[Week Name]
)And select this week always
You can refer this how to get week start and week end
- AnonymousNot applicable
amitchandak When you say select this week always, where should the selection be made? How do we select that in matrix.
Also, by the solution below what I understand is that my column values in matrix would now be week dates and a text value as 'This week' right?
- amitchandakSuper User
Anonymous , Are you a week on the column and it coming ascending sort order.
To deal with you need sort it descending. The week column or a new column only for this Matrix.
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Number = WEEKNUM([Date],2)
Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,desc,Dense)
Week name = [Week Start date] & " to "& [Week End date]Whatever format you have for the week. make desc week rank as a sort column and use that
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
- AnonymousNot applicable
Hi Anonymous ,
Please check if the workaround in the following thread can help you.
How to keep the scrollbar to the right in a power bi chart
Best Regards
Rena