Forum Discussion
View totals by week
Anonymous , You can join your date with date table and there you can create week and use that in the filter
columns like
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],1)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)
Week Number = WEEKNUM([Date],1)
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],,ASC,Dense)
You can create a custom Hierarchy if needed
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
2.Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
- Anonymous5 years agoNot applicable
Thank you for your response. I do have a dimDate calendar table I am linking my EventDate to, I just didn't have the formula for Week. If I put Week on my axis, two things. 1. It doesn't seem to be sorting right and 2. Instead of showing the year and week number, can I show the date of the first day, like week of June 7th, june 14th, june 21st, etc?
- v-zhenbw-msft5 years ago
Community Support
Hi Anonymous ,
If you want to show the first day in a week, you need to create a weeknum column and a start date column.
Please refer the following formula.
Weenum = WEEKNUM('Table'[Date],2)weenum_star_date = CALCULATE(MIN('Table'[Date]),FILTER('Table','Table'[Weenum]=EARLIER('Table'[Weenum])))The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
- v-zhenbw-msft5 years ago
Community Support
Hi Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?
Could you please provide more details or expected result about it If it doesn't meet your requirement?
If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.