Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I've created a calendar table that ends today.
Calendar = CALENDAR(MIN(Task[ActivityDate]);TODAY())
Now I would like to change it, so that it ends with the end of current quarter, I need some future dates.
I don't have any existing column with dates, I am creating it, so I can not use ENDOFQUARTER as it requires a column.
What should I write in DAX?
Solved! Go to Solution.
Not entirely sure I understand your requirements, but if this needs to be dynamic per day, you might do something like:
Calendar = var MonthToday = MONTH(TODAY()) var YearToday = YEAR(TODAY()) var EndDate = IF(MonthToday<4,DATE(YearToday,3,31),IF(MonthToday<7,DATE(YearToday,6,30),IF(MonthToday<10,DATE(YearToday,9,30),DATE(YearToday,12,31)))) RETURN CALENDAR(MIN(Task[ActivityDate]),EndDate)
Not entirely sure I understand your requirements, but if this needs to be dynamic per day, you might do something like:
Calendar = var MonthToday = MONTH(TODAY()) var YearToday = YEAR(TODAY()) var EndDate = IF(MonthToday<4,DATE(YearToday,3,31),IF(MonthToday<7,DATE(YearToday,6,30),IF(MonthToday<10,DATE(YearToday,9,30),DATE(YearToday,12,31)))) RETURN CALENDAR(MIN(Task[ActivityDate]),EndDate)
Yes, it needs to be dynamic.
Thank you 🙂
Cool, hope that formula works for you!
I've got an idea.
Calendar = CALENDAR(MIN(Task[ActivityDate]);TODAY()+92)
I've added a maximum number od days in a potential quarter.
That can help. But is it the proper solution?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |