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

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.

Thnaks

Narasimha Reddy

1 ACCEPTED SOLUTION
Solution Supplier

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

4 REPLIES 4
Solution Supplier

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

Hope this helps!

JJ

Helper I

Thanks for quick response..

With your DAX formula, Am getting below results.

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

Solution Supplier

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

Helper I

Thanks @DoubleJ, Its working fine.

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 - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors