Forum Discussion
CraigBlackman
11 years agoHelper III
How do I compare compare dates and values?
I have a SQL query that returns a table at present, see below. I'd like to use Bi to do this rather than a mix of sql and bi. How do i return the current months sales vs the year previous? I ...
- 11 years ago
It sounds like what you want is something along the lines of PARALLELPERIOD
There are also some techniques here that might help:
http://www.daxpatterns.com/time-patterns/
Not sure what you have tried thus far.
- 11 years ago
I suppose you want to compare januar 2014 to januar 2015. If so, you can use this DAX formula:
Prior Year Same Month Sales = CALCULATE(
SUM([Sales Amount]);
DATESMTD(SAMEPERIODLASTYEAR(Calendar[DateKey])))
CraigBlackman
11 years agoHelper III
Thanks for this. A big help.
mstefancik
11 years agoAdvocate IV
You are welcome. Hope it saves your time.