Forum Discussion
rpinxt
Solution Sage
4 years agoCalenderauto on specific date field
So I have a calenderauto via DAX: Now my data has 3 date fields. Fields like Manufacturing Date and Use before date are messing up my min and max date that I want to have. I want the calende...
- 4 years ago
rpinxt , Then you can use of the calendar is best. auto-calendar has a different purpose
I usually force those date to go start and end of the year
CALENDAR(eomonth([MinRepDate], -1* Month([MinRepDate])) +1 ,eomonth([MaxRepDate] , 12 -1* Month([MinRepDate]) ))
amitchandak
Super User
4 years agorpinxt , I tried it worked for me
Date =
var _weekday =3
var _left = _weekday -7
var _tab = ADDCOLUMNS(CALENDARAUTO(),"Month Year",format([Date],"MMM-YYYY"),
"Month Year Sort", FORMAT([Date], "YYYYMM"),
"Year", YEAR([Date])
,"QTR Year" , FORMAT([Date],"YYYY-\QQ"),
"Week Year", YEAR([Date]) *100 + WEEKNUM([date],2),
"Day", Today() - Weekday(Today(),1),
"Weekday" , WEEKDAY([date]),
"Week Start Date1" , [Date] + -1*WEEKDAY([Date])+1,
"Week End Date1" , [Date] + -1*WEEKDAY([Date])+7,
"Week Start Date" , [Date] + -1*if(WEEKDAY([Date])<=_weekday,WEEKDAY([Date],1)+_weekday,WEEKDAY([Date],1)+ _left)
)
return ADDCOLUMNS(_tab, "Week Rank" , Rankx(_tab,[Week Year], ,ASC,Dense))
What is the issue