Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Winniethewinner
Helper IV
Helper IV

Add an indicator if it's next 3 month

Hi experts, 

 

I have a calculated month table to retrieve all months from my fact table. 

 

Values in Month (Date Format) column is dynamic rolling 12-month ahead. I'd like to create a "Next 3 Month Indicator" column where: if Month (Date Format) <= MIN(Month (Date Format)) + 2 Month, then "Yes", else "No". 

 

Winniethewinner_3-1720807044612.png

 

Could anyone please help me with the DAX? Thanks in advanced. 

 

 

 

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @Winniethewinner ,

 

There are many ways to achieve your required output, but I am wondering the reason why your calendar table has to be in month granularity.  I would normally create a calendar table with day granularity and create relationship with the fact table.

Calendar =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2024, 01, 01 ), DATE ( 2024, 12, 31 ) ),
    "yyyy-mm", FORMAT ( [Date], "yyyy-mm" ),
    "Next 3 months",
        IF ( [Date] >= TODAY () && [Date] <= EOMONTH ( TODAY (), 3 ), "Yes", "No" )
)

 Then you can summarize the calendar table using the month granularity as shown below:

DataNinja777_0-1720831310457.png

I attach a pbix file as an example.

Best regards,

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @Winniethewinner ,

 

There are many ways to achieve your required output, but I am wondering the reason why your calendar table has to be in month granularity.  I would normally create a calendar table with day granularity and create relationship with the fact table.

Calendar =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2024, 01, 01 ), DATE ( 2024, 12, 31 ) ),
    "yyyy-mm", FORMAT ( [Date], "yyyy-mm" ),
    "Next 3 months",
        IF ( [Date] >= TODAY () && [Date] <= EOMONTH ( TODAY (), 3 ), "Yes", "No" )
)

 Then you can summarize the calendar table using the month granularity as shown below:

DataNinja777_0-1720831310457.png

I attach a pbix file as an example.

Best regards,

I took the latter part of formula and added a column, it works, thanks! 

IF ( [Date] >= TODAY () && [Date] <= EOMONTH ( TODAY (), 3 ), "Yes", "No" )

The reason my calendar table in month granularity is because my fact table is aggregation by month. Also, my calendar table is calculated based on fact table as it is always changing. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.