Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
IdoiaPerez
New Member

DATEADD ERROR

Hola expertos,

 

¿Puede alguien ser capaz de guiarme cómo solucionar este problema, por favor?

IdoiaPerez_0-1672395240300.png

Mi código DAX es este: 

_Mes anterior_Recuento usuarios = calculate (([_Recuento usuarios]),  DATEADD (usuarios[Fecha alta], -1, MONTH))
 
El resultado en DASHBOARD es este: IdoiaPerez_1-1672395325950.png, pero cuando lo quiero filtrar es cuando me da el dateadd error.
 
Lo he intentado corregir cambiando el DATEADD (usuarios[Fecha alta], -1, MONTH)) por 
DATEADD (_Calendario[Fecha].[Date], -1, MONTH)), pero el resultado no es el esperado ya que me sale esto: IdoiaPerez_2-1672395426305.png, no me llega a hacer la comparativa con el mes anterior y no sé donde puede estar el error. 

 

 
Gracias de antemano.
Idoia Pérez. 
3 REPLIES 3
Anonymous
Not applicable

Hi @IdoiaPerez 

You can refer to the following links:

Solved: Dateadd - Microsoft Power BI Community

Solved: DATEADD DAX FUNCTION - Microsoft Power BI Community

Best Regards!

Yolo Zhu

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

FreemanZ
Super User
Super User

hi @IdoiaPerez 

DATEADD is a Time Intelligence  function. Always reference the date column from a qualified Date Table in Time Intelligence functions.

amitchandak
Super User
Super User

@IdoiaPerez , dateadd need continous dates, so it can error if they are not

to add days, simple add to date

[Date] +20

 

for year and month use date

add 10 month

date(year([Date]) , month([Date])+10, day([Date]) )

 

Dateadd and its Alternate: https://www.youtube.com/watch?v=9qiRivlBv8w&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=66

 

Date as Dateadd
https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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