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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
jkal4712
Frequent Visitor

Indicator for Rolling 18 Months

I am trying to display an indicator in column "Rolling 18 Months", so I can filter sales by rolling 18 months.  Below is the formula I tried without success.  I want it to display "true" when the date is within the 18 month window and "false" when it is not. Any help is appriciated, thank you!

 

Rolling 18 Months =
VAR EndDate =
EOMONTH(Today(), -1 )
VAR StartDate =
EDATE(EOMONTH(TODAY(), -1 ), -18 ) + 1
RETURN
IF(
MAX( 'OpCo Purchases Query (SEED)'[day_dt]) >= StartDate
&& MAX('OpCo Purchases Query (SEED)'[day_dt] ) <= EndDate,
TRUE (),
FALSE ()
)
 
jkal4712_0-1645483800295.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jkal4712 , You are creating a column, No need for Max. The column need to be created in OpCo Purchases Query (SEED) table

 

Rolling 18 Months =
VAR EndDate =
EOMONTH(Today(), -1 )
VAR StartDate =
EDATE(EOMONTH(TODAY(), -1 ), -18 ) + 1
RETURN
IF(
( 'OpCo Purchases Query (SEED)'[day_dt]) >= StartDate
&& ('OpCo Purchases Query (SEED)'[day_dt] ) <= EndDate,
TRUE (),
FALSE ()
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@jkal4712 , You are creating a column, No need for Max. The column need to be created in OpCo Purchases Query (SEED) table

 

Rolling 18 Months =
VAR EndDate =
EOMONTH(Today(), -1 )
VAR StartDate =
EDATE(EOMONTH(TODAY(), -1 ), -18 ) + 1
RETURN
IF(
( 'OpCo Purchases Query (SEED)'[day_dt]) >= StartDate
&& ('OpCo Purchases Query (SEED)'[day_dt] ) <= EndDate,
TRUE (),
FALSE ()
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you so much that worked perfectly! 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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