Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I am analyzing Year-over-Year, Year-to-Date revenue trends and I'm having some troubles coming up with the right formula for the Prior Year Amounts. For example, it's now January 2, so I want to compare Jan 1-2 2018 revenue with Jan 1-2 2019 revenue.
When I have used SAMEPERIODLASTYEAR the formula returns the entire Jan 2018 amount instead of just the first and second days of the month. I have tried a couple more complex equations that I found on the forums that involved naming variables and if statements, but I ran into the same issue with each permutation I tried. Is there a solution for this?
Formula:
2018 YTD Revenue = CALCULATE(Revenue[2018 Revenue],SAMEPERIODLASTYEAR('Date Table'[Date]))
Worksheet Setup:
Dropbox link to Download: Link
Thanks in advance for your help! Please let me know if you need any more info...
Solved! Go to Solution.
If you place the dates (up to the day level) in the rows of the matrix, just like you had in your pbix, it should work. The measures will return the YTD up to the day in the current row.
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |