cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin11
Memorable Member
Memorable Member

How to convert YTD expression to LYTD ?

Hi All

@dvl_ctaul 

Give me below very powerful expression :-
Sales YTD flex = CALCULATE ( [SALES_],DATESYTD('DATE'[Date])
)
 
I want to convert the above expression to LYTD , i try :-
Sales LYTD flex = CALCULATE ( [SALES_],DATESLYTD('DATE'[Date])
)
 
it does not work.
 
Can some one advise me .
 
Paul
 
 
1 ACCEPTED SOLUTION
2 REPLIES 2
AlexisOlson
Super User
Super User
VahidDM
Super User
Super User

 @admin11 Paul,

 

Try this:


Sales LYTD flex = CALCULATE ([Sales YTD flex],SAMEPERIODLASTYEAR('DATE'[Date])

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/


 

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors