Forum Discussion
Formula using the value of previous year
- 5 years ago
Hi Anonymous
You could use a Date table which has continuous distinct dates, and create a relationship between your original fact table and Date table on date column. If your fact table has duplicate date values, this relationship should be one-to-many (Date table on one side and fact table on many side). Then you could refer to below articles.
DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question - RADACAD
Time Comparisons In Power BI: This Year vs Last Year | Enterprise DNA
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Hello, Thank you!
but it's written that every date should be only once
And that's not my case.
Futhermore, what are you calling Port Ouverture in your code? Because you put Port Ouverture and Port Ouverture 1.
Thank you
Hi Anonymous
You could use a Date table which has continuous distinct dates, and create a relationship between your original fact table and Date table on date column. If your fact table has duplicate date values, this relationship should be one-to-many (Date table on one side and fact table on many side). Then you could refer to below articles.
DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question - RADACAD
Time Comparisons In Power BI: This Year vs Last Year | Enterprise DNA
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.