cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular 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 ()
)

1 ACCEPTED SOLUTION
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 ()
)

2 REPLIES 2
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 ()
)

Regular Visitor

Thank you so much that worked perfectly!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors