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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anand_ch
New Member

How To work with DAX to remove duplicate dates

My Quey :   Forum_Event = (SWITCH(TRUE(),'ALL Members'[Date Forum Joined]<=DATEADD('ALL Members'[Date Joined],90,DAY),'ALL Members'[External User ID])/'ALL Members'[External User ID])
 
 
 
Error:A date column containing duplicate dates was specified in the call to function 'DATEADD'. This is not supported.
1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anand_ch 

According to your description , Wen you used DATEADD() function , It returned you an error. Right ?

First of all, the DATEADD() function is a time intelligence function, and when we use it, it is best to ensure that the date column is a continuous and non-repeating column.

Here are the steps you can follow:

(1)We can click "New Table" and enter :

CALENDARCALENDAR(FIRSTDATE('ALL Members'[Date Joined]),LASTDATE('ALL Members'[Date Joined])
(2)Then we need to establish a one-to-many relationship between the table 'ALL Members' and the table 'CALENDAR' based on [Date].
(3) When we use the date column, we can replace it with the 'CALENDAR'[Date] we created.If it's a visual, we also need to replace our 'CALENDAR'[Date] field in the row header.
 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anand_ch 

According to your description , Wen you used DATEADD() function , It returned you an error. Right ?

First of all, the DATEADD() function is a time intelligence function, and when we use it, it is best to ensure that the date column is a continuous and non-repeating column.

Here are the steps you can follow:

(1)We can click "New Table" and enter :

CALENDARCALENDAR(FIRSTDATE('ALL Members'[Date Joined]),LASTDATE('ALL Members'[Date Joined])
(2)Then we need to establish a one-to-many relationship between the table 'ALL Members' and the table 'CALENDAR' based on [Date].
(3) When we use the date column, we can replace it with the 'CALENDAR'[Date] we created.If it's a visual, we also need to replace our 'CALENDAR'[Date] field in the row header.
 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

tamerj1
Super User
Super User

Hi @Anand_ch 

what do you want to achieve using the DATEADD function?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors