Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
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 see there are many options to do this, all which which fail to weork for me. Any help apprecated.
Solved! Go to Solution.
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.
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])))
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.
Thanks for that. Using the forula below i just get a blank column. Why would this be?
YoY = CALCULATE(SUM(order_header_total[oht_foreign_net]),PARALLELPERIOD(order_header[oh_datetime],-1,YEAR))
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])))
Thanks for this. A big help.
You are welcome. Hope it saves your time.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.