Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all, I am trying to figure out the proper dax for filtering my date table to show the current month and future months. I am working on a PACE/lead time report. I have this column in my calendar table:
IF(
CalendarQ[Year] >= YEAR(TODAY()) && CalendarQ[Month] >= MONTH(TODAY()),
1,
0
)
But this only shows today to EOY and next year after the current month. I wanna see the current month and forward months.
I can do
IF(
CalendarQ[Date] >= TODAY(),
1,
0
)
But that only shows current day + and I would like to see current month + .
Thank you for your help.
Solved! Go to Solution.
[Your Column] =
var CurrentYear = YEAR( TODAY() )
var CurrentMonth = MONTH( TODAY() )
var CurrentMonthId = CurrentYear * 100 + CurrentMonth
var Output = INT( 'Calendar'[MonthId] >= CurrentMonthId )
return
Output
Create a column in your Calendar that's MonthId = year( [date] ) * 100 + month( [date] ). You'll then use this in the formula above.
[Your Column] =
var CurrentYear = YEAR( TODAY() )
var CurrentMonth = MONTH( TODAY() )
var CurrentMonthId = CurrentYear * 100 + CurrentMonth
var Output = INT( 'Calendar'[MonthId] >= CurrentMonthId )
return
Output
Create a column in your Calendar that's MonthId = year( [date] ) * 100 + month( [date] ). You'll then use this in the formula above.
Awesome thank you!
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |