Forum Discussion
elitesmitpatel
2 years agoSolution Supplier
current week dates in matrix
I want to create a matrix in which column should have date of current week .as shown in week 05/2 ,06/2 ,07/2 .......
amitchandak AmiraBedh lbendlin Daniel29195 PijushRoy Greg_Deckler Ritaf1983 Ashish_Mathur Idrissshatila danextian Ahmedx ryan_mayu
2 Replies
- AmiraBedhSuper User
Can you share some data so we can help you ?
- AnonymousNot applicable
Hi elitesmitpatel ,
You can create a date table using the following formula.
Date = ADDCOLUMNS ( CALENDAR ( DATE ( 2019, 01, 01 ), DATE ( 2022, 12, 31 ) ), "Year", YEAR ( [Date] ), "Quarter", ROUNDUP ( MONTH ( [Date] ) / 3, 0 ), "Month", MONTH ( [Date] ), "Week", "Week" & WEEKNUM ( [Date] ), "Year-Qur", YEAR ( [date] ) & "Q" & ROUNDUP ( MONTH ( [Date] ) / 3, 0 ), "Year-Mon", YEAR ( [Date] ) * 100 + MONTH ( [Date] ), "Year-Week", YEAR ( [Date] ) * 100 + WEEKNUM ( [Date], 2 ), "Weekday", WEEKDAY ( [Date], 2 ) )DayOfWeek = SWITCH ( [Weekday], 1, "Monday", 2, "Tuesday", 3, "Wednesday", 4, "Thursday", 5, "Friday", 6, "Saturday", 7, "Sunday", BLANK () )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.