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.
Greeting lovely members.
i used the function Dateadd and it seems like it's glitching (im not sure tho)
Last year sales = CALCULATE(Fact_Sales[Sales Value],DATEADD(Dim_Date[Date],-1,YEAR))
Solved! Go to Solution.
@Anonymous , If this is a measure
Like
Last year sales = CALCULATE(Sum(Fact_Sales[Sales Value]),DATEADD(Dim_Date[Date],-1,YEAR))
or Sales Value is a measure. then your formula
if you need a new column , please share data
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
@Anonymous , If this is a measure
Like
Last year sales = CALCULATE(Sum(Fact_Sales[Sales Value]),DATEADD(Dim_Date[Date],-1,YEAR))
or Sales Value is a measure. then your formula
if you need a new column , please share data
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
First Thanks for your answer .
that's my output . as you see LY Sales measure show sales of last year so all good .
my question here why it doesnt work when i put -1 in the interval and works when i put 1 ?
@Anonymous , it should work. Just make a sure the year is from dim_Date, also it is marked as date table
Yes it is .
i used an M function to build my DimTable . and the type of the column Dim_date[Date] is a Date.
The function DateAdd accept only Date column anyway.
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 |
---|---|
119 | |
82 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
79 | |
72 | |
49 | |
46 |