Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi I am sorry I can not give upload my pbix file but I will try to be as clear as possible.
So I have a fact table that contains many versions of a single between 2013-2020 and a date table that also contains many versions of a single year (I tried just having a date table with the 7 specific years, yes that removes the many to many relationship but I can not do DATEADD(Date[Year]) this function does not work. The error given is that DATEADD is not of type DATE).
I am trying to calculate the Total Value of my fact table. Doing a simple sum works and gives me the correct values however when I use
Hi @Anonymous ,
Is the date table a calendar table? if not, I think you need to create a calendar table firstly. The following is my sample using the both functions of DATEADD and SAMEPERIODLASTYEAR you can have a try.
Date = CALENDARAUTO() year = YEAR('Date'[Date].[Date])
SAMEPERIODLASTYEAR = CALCULATE(SUM(Table1[ Sales]),SAMEPERIODLASTYEAR('Date'[Date])) DATEADD = CALCULATE(SUM(Table1[ Sales]),DATEADD('Date'[Date],-1,YEAR))
Note: If you choose 2015 to 2017, then it will be calculated the values of last year of the selected date. So the values of 2017 will not be showed.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
133 | |
76 | |
53 | |
38 | |
37 |
User | Count |
---|---|
202 | |
80 | |
71 | |
55 | |
48 |