Forum Discussion
create weekly date
- 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
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
Thanks a lot Anonymous , its working :)
but just to make sure if what i am doing is right
so i added new column "YearWeek" and then put it in axis under weekname.
This is correct or you have another method ?
Thanks