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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Ghaston
Helper I
Helper I

Dateadd Function returns error when i Drilldown

Hi 
I'm using the "DATEADD" function in my report, and it works perfectly, until i start to DrillDown in my sharts. 
i get this Error :" Error in the calculated mesure 'Data'[Mois - mois-1] : the DATEADD function expects a continous selection when the date column is not unique, or not continous or contains hours".
5.PNG
But my date column has continous dates : 

2.png

I even created another date table, but it  doesn't work. 
Here is the shart that shows me errors when i DrillDown with " Type d'article" 
I get that Error only when i get to the last level in the hierachy. 
And here is my two formulas, that contains "DATEADD".
here is the link to my Power BI file : 
https://drive.google.com/open?id=1ZknrfWAoECPKoS9kmnZ56vg5A18GP_cU
1.PNG3.PNG4.PNG

3 REPLIES 3
rajulshah
Super User
Super User

Hello @Ghaston,

 

Column used in the DATEADD function in measure Mois - (mois-1) refers to 'Echelle de temps' which doesn't have continuous dates. 

 

For that you must create a dimension date table with continuous dates and set the relationship with column Echelle de temps.

 

Hope this helps.

There is a picture in my message showing the " Echelle de temps" data. Why that isn't continous ? it doesn"t skip any month since decembre 2017. 
I created a date table, that starts from MIN of "Echelle de temps" and ends at MAX "Echelle de temps", and that gave me the same " Echelle de temps " column. 

Hello @Ghaston,

 

It should contain series of dates from 1st to 30/31st. Column of such dates are known as "contiguous dates".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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