Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
https://drive.google.com/file/d/1rXHBG2R5xuMtC0J-EwSaVsaunsjehjbf/view?usp=sharinghttps://drive.google.com/file/d/1siMKeL9KM2JerWBNoLyHpdgL_fFaF0yO/view?usp=sharing
I am trying to calculate YOY but not working...
Solved! Go to Solution.
Hi @staycool
By my test, your formula is worked. You can have a try to the following steps to check your table.
1.Required the table about date is a calendar table , if you use a time intelligence function.
2.Choose Modeling -->Manage Relationships. The relationship of two tables is many-to-one.
3.In report view, choose Modeling --> New Measure
DATEADD() and SAMEPERIODLASTYEAR() are related to the date, you need to add the date in the calendar table.
total sales = sum('data'[Gross Sales])
last year = CALCULATE('data'[total sales],DATEADD('Table2'[DATE].[Date],-1,year))
last year2 = CALCULATE( [total sales], SAMEPERIODLASTYEAR('Table 2'[Date].[Date]))
Different = IF( ISBLANK([last year2]),BLANK(),[last year2] -[total sales] )
YOY = [Different] / [last year2]
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.
Hi @staycool
By my test, your formula is worked. You can have a try to the following steps to check your table.
1.Required the table about date is a calendar table , if you use a time intelligence function.
2.Choose Modeling -->Manage Relationships. The relationship of two tables is many-to-one.
3.In report view, choose Modeling --> New Measure
DATEADD() and SAMEPERIODLASTYEAR() are related to the date, you need to add the date in the calendar table.
total sales = sum('data'[Gross Sales])
last year = CALCULATE('data'[total sales],DATEADD('Table2'[DATE].[Date],-1,year))
last year2 = CALCULATE( [total sales], SAMEPERIODLASTYEAR('Table 2'[Date].[Date]))
Different = IF( ISBLANK([last year2]),BLANK(),[last year2] -[total sales] )
YOY = [Different] / [last year2]
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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
111 | |
109 | |
106 | |
90 | |
61 |
User | Count |
---|---|
165 | |
136 | |
134 | |
97 | |
86 |