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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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