Forum Discussion
joshua1990
Post Prodigy
6 years agoFilter just for completed months
Hello everybody! I need to add a column to my calendar to filter in my views just for completed months. The calendar I am using is a fiscal calendar like Date - Fiscal Month Does someone know ...
- Anonymous6 years ago
// Let's say that FiscalMonthID is // a unique identifier of a fiscal // month in Calendar. [Full Fiscal Month] = // calculated column var __today = TODAY() var __currentFiscalMonth = Calendar[FiscalMonthID] var __allFiscalMonthDatesAreOK = ISEMPTY( FILTER( 'Calendar', Calendar[FiscalMonthID] = __currentFiscalMonth && Calendar[Date] > __today ) ) RETURN __allFiscalMonthDatesAreOKBest
D
mahoneypat
Microsoft Employee
6 years agoIt won't work for fiscal months. I forgot about that part. What is your logic to determine the fiscal month. If you share it, I will try an alternate expression.
Regards,
Pat
joshua1990
Post Prodigy
6 years agoThe fiscal months are based on the fiscal weeks:
Week 1-4 = January
Week 5-8 = February
Week 9-13 = March
The measure is:
VAR FiscalWeek =WEEKNUM ( Date, 21 )
- Anonymous6 years agoNot applicableJust create a column where you'll store FiscalMonthID the way I indicated in the piece of code above and you'll be able to create the column. You should have FiscalMonthID in the table regardless.
Best
D