Forum Discussion
DCPics
Helper I
5 years agoFiltering data on year prior to year selected
I have built a report that will show year over year data, however I realized that with the new year 2 weeks away the current year (CY) data will be worthless. I was hoping to create a way to have th...
- 5 years ago
First, here is a link to a great tool that formats DAX for you to make it easier to read.
You don't need two CALCULATE statements. You previously created the measure for [# of Customer Shipments] so plug that in like this. Generally speaking you NEVER want to repeat the same DAX because if it ever changes, you have to find everywhere it's used to correct it.
CALCULATE( [# of Customer Shipments], DATEADD( 'Calendar'[Date], -1, YEAR ) )
Try an experiment. Take the [# of Customer Shipments] and [# of Customer Shipments PY] and drop them both into a column or line chart, calendar year and month on the X axis with no date slicer. This will show you that it'll work 😉
DCPics
Helper I
5 years agoI got it to work! Thank you very much for all your help today, I really appreciate it! Have a great holiday season!