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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Caldowd98
Helper I
Helper I

Vs Previous Working Day Last Year

Hi Community

 

I have a table similar to the below where i am looking to create a measure that calculates the units for the same Month, Same working day but the previous year.

DateWorking DayQTYVs Previous Year
01/08/202211000?
02/08/202221250?
05/08/202231500?

Is there a way to acheive this ? I have a date table already set-up with the working day included.

 

Thanks !

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Caldowd98 ,

Please try

Vs Previous Year = 

CALCULATE(
    [Sales Amount],
    DATEADD('Calendar'[DateKey],-1,YEAR
    )
)


Hope that helps, please mark this as a solution if it helps

Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Caldowd98 ,

Please try

Vs Previous Year = 

CALCULATE(
    [Sales Amount],
    DATEADD('Calendar'[DateKey],-1,YEAR
    )
)


Hope that helps, please mark this as a solution if it helps

Regards

NickA01
Resolver III
Resolver III

HI, 

Sorry for obvious question but have you tried SAMEPERIODLASTYEAR function (DAX) - DAX | Microsoft Docs
and if so, what error\ issue have you encountered? 

The Nick

If the post helps please give a thumbs up || If it solves your issue, please accept it as the solution to help the other members find it more quickly.

If it's the biggest heap of stinky smelly stuff then I'm sorry .

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.