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! Request now

Reply
PBIUser23
New Member

Exact same measure not working in new model

I have a measure that is meant to display the order quantity of the PRIOR year. 
So if there is a filter on the page for "Year = 2024", this measure should display the quantity for 2023.

 

In the original model, the below measure works perfectly. We are creating a new model (due to move from on-prem to cloud datasource). The new model tables and relationships are set up identically to the original. 

However, this measure is coming up blank in the new model. It will not populate results -it seems to not be respecting the "ALL('Calendar'[Year])"

 

Can anyone please help me understand why this would no longer work?

 

Order Qty - PY =
var selPriorYear = SELECTEDVALUE('Calendar'[Year])-1
RETURN
    CALCULATE(
         sum(Orders[Total Order Qty])
        ,FILTER(ALL('Calendar'[Year]),'Calendar'[Year]=selPriorYear))
1 REPLY 1
rajendraongole1
Super User
Super User

Hi @PBIUser23 - slight change as per shared measure . check the below

 

Order Qty - PY =
VAR selPriorYear = SELECTEDVALUE('Calendar'[Year])-1
RETURN
CALCULATE(
SUM(Orders[Total Order Qty]),
FILTER(
ALL('Calendar'),
'Calendar'[Year] = selPriorYear
)
)

 

or try with sameperiodlastyear too.

 

Hope it helps

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.

Top Solution Authors