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
Syndicate_Admin
Administrator
Administrator

Error in DatesinPeriod formula

Nice day

I'm using the datesinperiod metric to calculate the moving sum of 12 months of warehouse parts outputs but it throws me the error

Calculation error in measure 'Metricas'[Salidas12MM]: A date column containing duplicate dates was specified in the call to function 'DATESINPERIOD'. This is not supported

Salidas12MM = Calculate
(sum(TransactionItems[QTY]),
DATESINPERIOD(TransactionItems[OutDate],
MAX(TransactionItems[OutDate]),-12,MONTH))

1 REPLY 1
johnt75
Super User
Super User

When using the time intelligence functions you need to have a properly formatted date table, which has only 1 entry for each day. Set up a date table, mark it as a date table and set up a relationship from the date table to your transactions table and then use columns from the date table in any visuals, filters and formulas.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.