cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mdoll
Frequent Visitor

Quarter to Date last Year

OK, so I have tried many of the DAX formulas.....PARRALLELPERIOD...SAMEPERIODLASTYEAR

 

What I can't figure out is the proper syntax.  I need to show the TOTAL of the same Quarter from last year.  I thought it would be easy.

The above do not bring JUST the equivalent of the current period.  It brings all periods for the year.  I can't figure out how to filter JUST the current period number from the last year.

I can write some dataadd formulas I guess....but it should be simpler

3 REPLIES 3
scottsen
Memorable Member
Memorable Member

I just went and played w/ Northwind... and I at least kinda expected the last measure to "act weird", but ya know... it all kinda "just works" for me.

 

Total Sales:=SUMX('order-details', 'order-details'[Quantity] * 'order-details'[UnitPrice])

Sales QTD:=CALCULATE([Total Sales], DATESQTD(Dates[Date]))

Sales QTD - PY:=CALCULATE([Sales QTD], SAMEPERIODLASTYEAR(Dates[Date]))

 

mdoll
Frequent Visitor

So, this is similar results that I was getting with over formulas.

I am currently in Qtr 2....I want the Total of Qtr 2 from Last Year.

If I use what you have here:

newprevyrqtractual = CALCULATE([QTD Actual],SAMEPERIODLASTYEAR('Date'[Date]))

The results are NOT what I want.

I returns a value...for ALL dates...and the value is not near what I expect.

scottsen
Memorable Member
Memorable Member

Okay, I suspect I understand your problem.  Can you try putting your measure in a table/matrix with Year & Qtr ?  I suspect it will work just fine... *if* you are specifiying the year/qtr in the context.

 

I suspect you are saying "cool story bro... but I only care about the current quarter to date" (and the prior years, current quarter to date) ?

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.