Forum Discussion
rezaaditia
Helper III
7 years agocreate weekly date
Hi - please help with the dax formula to create combination of week and date of every monday. basically we want to create weekly report and if we use week numbers, it will be difficult to unders...
- Anonymous7 years ago
Hi rezaaditia ,
I hope you have a calendar ( date ) table in your model.
Do the following
1. Create a calculated column called Week
Week = WEEKNUM([Date],2)2. Create another calculated column WeekNameWeekName = "W-" &FORMAT(CALCULATE( MIN('Calendar'[Date]),This will give the output as desired.Filter('Calendar','Calendar'[Week] = EARLIER('Calendar'[Week]) )),"MM/DD")CheersCheenuSing - Anonymous7 years ago
Hi rezaaditia ,
Try the following
1. Add another column
YearWeek = Year(Table[Date]) * 100 + Table[WeekNum]
( Replace Table by your tablename)
2. Using the modelling tab set the Sort order for WeekName to YearWeek.
Cheers
CheenuSing
- Anonymous7 years ago
Hi rezaaditia ,
You should not add the YearWeek in the axis name.
what you should do is select the Calculated column WeekName in the Fields pane.
Go to the modelling pane
From the sort by column set it to YearWeek.
Cheers
CheenuSing
Anonymous
7 years agoNot applicable
hi rezaaditia ,
Use this formula,
W-MM/DD = "W-"&MONTH('Table (2)'[Date])&"/"&'Table (2)'[Day]
see above screenshot,
I created startofweek new column ==> Edit queris ->click on Your date column -> click on add column (top of header)->Date(i'll showing some options) -> Go week-> startof week
Day & Month same this two columns Follow above process
regards,
naveen