Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Narasimha
Helper I
Helper I

DAX help on Last3 months

Hi Team,

 

I have created visual for last 3 months data using below dax. here i want to exclude current month data.

 

3monthsDAX.PNG

 

Thnaks

Narasimha Reddy

 

 

1 ACCEPTED SOLUTION

sorry, my mistake!

 

Replace ">=" with ">". The equal sign is not needed as it returns TRUE() on the last day of the month in March. Formula then is:


3Months = IF(Data[Date] > EOMONTH(TODAY();-4) && Data[Date] < EOMONTH(TODAY();-1);
    TRUE();
    FALSE())

Greetings

JJ

View solution in original post

4 REPLIES 4
DoubleJ
Solution Supplier
Solution Supplier

How about

 

3Months = IF(Data[Date] >= EOMONTH(TODAY();-4) && Data[Date] < EOMONTH(TODAY();-1);
    TRUE();
    FALSE())

 

Hope this helps!

JJ

Thanks for quick response..

 With your DAX formula, Am getting below results.

 

3monthsDAX1.PNG

 

In the above Visual, I am getting extra month i/e Mar'2017 data as well. I need to exclude Mar'2017 data.

 

Thanks

Narasimha Reddy

 

 

sorry, my mistake!

 

Replace ">=" with ">". The equal sign is not needed as it returns TRUE() on the last day of the month in March. Formula then is:


3Months = IF(Data[Date] > EOMONTH(TODAY();-4) && Data[Date] < EOMONTH(TODAY();-1);
    TRUE();
    FALSE())

Greetings

JJ

Thanks @DoubleJ, Its working fine.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

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.

Top Solution Authors