Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic lastdecember results.

 
Hello everyone,
 
I'm working on a dax that measures the results of Lastdecember revenue by selecting the year.  My dax formula is : 

A = CALCULATE(CALCULATE([Total Non-Quality],LASTDATE('Calendar'[Year/Month])),PARALLELPERIOD('Calendar'[Year/Month],-1,YEAR))

 

when I apply this formula I obtain these results by filtering on sites: Last December results = 14.98 (of 2018) for one site and the global is 27.81 (of 2018)

 

When I change this formula to select Last December revenue for each year it doesn't work especially when I filter by sites. So the formula that I used is : 

 
B = CALCULATE([Total Non-Quality],FILTER(ALL('Quality 12MR'),YEAR('Quality 12MR'[Date])=SELECTEDVALUE('Calendar'[Year/Month].[Year])-1 && MONTH('Quality 12MR'[Date])=12))
 
the results that I obtain are Last December results = 27.81 (of 2018) for one site and the global is 27.81 (of  2018) when I don't apply site as a filter, so it doesn't filter by site. 
 
Thank you for the response.
Best regards. 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

1 REPLY 1
Anonymous
Not applicable

 @Mariusz 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.