cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
jkal4712
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 ()
)
 
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 ()
)

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

Thank you so much that worked perfectly! 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors