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

Anonymous
Not applicable

## DATEADD not giving month from last year

Following Date Add logic should return "Dec-2021" as value but giving no result, i am getting NULL in the field can anyone please help in this regard as my agging reports getting effected due to that.

DATEADD( Aging_label[today].[Date],-1,MONTH)

1 ACCEPTED SOLUTION
Community Champion

Hi @Anonymous

In your formula  you are using  a date column from the fact table which might contain gaps in date. Time Intelligence functions like DATEADD work more efficiently with a Calendar Date Table.

You need to add a Calendar date table to your model and link it to the fact table on date column, then use Calendar date column into your DAX formula.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

9 REPLIES 9
Anonymous
Not applicable

Hi @Anonymous ,

Dateadd returns a table that contains a column of dates, shifted either forward or backward in time by the specified number of intervals from the dates in the current context.

Do you want to return one column of data or one table？

I have create a sample data.Please have a try.

Create a measure.

``Measure = EDATE(SELECTEDVALUE(Aging_label[today]),-1)``

Best Regards

Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Champion

Hi @Anonymous

In your formula  you are using  a date column from the fact table which might contain gaps in date. Time Intelligence functions like DATEADD work more efficiently with a Calendar Date Table.

You need to add a Calendar date table to your model and link it to the fact table on date column, then use Calendar date column into your DAX formula.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

JAN is current month and next should be ... one month before current month and next 2 month before current month.. was working fine in 2021 but after change in year creating problem

Solution Sage

Is this date column? I mean that functions like DATEADD works only with date formatted field

Did I answer your question? Mark my post as a solution!

https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!

Anonymous
Not applicable

yes this is date column

Solution Sage

There is something that is not clear, to our side, share the full calculation measure, maybe the date column is not complete or data model. There can be a lot of reasons why not working

Did I answer your question? Mark my post as a solution!

https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!

Solution Sage

Hi, @Anonymous

Try to remove .[Date]

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

Did I answer your question? Mark my post as a solution!

https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!

Anonymous
Not applicable

tried same results

Solution Sage

Can you share some examples of your data (sample)?

Did I answer your question? Mark my post as a solution!

https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!

## Helpful resources

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

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors