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
guibenassi
Advocate II
Advocate II

DATEADD ERROR

I create some measures with dateadd and I suspect that are some errors on that.

Then I create a calculated columm to see the DATEADD working and prove the problem.

I read some comments about using a date table, but I don´t want to use a date table for some reasons.

Above the table, with the calculated columm and it is possible to see some blank lines.

Capturar.PNG

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @guibenassi ,

 

Without an extra date table, please try below formula:

Vcto Ajustado=DATEADD('Receber E1'[E1_BAIXA2].[DATE];-15;DAY)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @guibenassi ,

 

Without an extra date table, please try below formula:

Vcto Ajustado=DATEADD('Receber E1'[E1_BAIXA2].[DATE];-15;DAY)

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


@v-yulgu-msft wrote:

Hi @guibenassi ,

 

Without an extra date table, please try below formula:

Vcto Ajustado=DATEADD('Receber E1'[E1_BAIXA2].[DATE];-15;DAY)

Yes, that will work but note that you must have AutoDate features enabled for this to work. Something I didn't think about because I always have it disabled. Smiley Happy



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

You have to create a Date table. The reason they are returning blanks is the dates that are being calculated don't exist in the column you are using as your source. See this thread for a more comprehensive explanation.

 

DATEADD() isn't like an Excel function. It relies on a true Date table to work for both calculated columns and measures.

 

You could do this in Power Query though if you are insistent in not createing a date table. See the Date.AddDays() function there. However, that would create a column and still wouldn't solve your original problem of wanting this in a measure.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Europe Fabric Conference

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 Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 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