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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Hari19
New Member

YTD LY

Hi, 

 

Any help appreciated here. 

Query1 - Data feed/ table title, discount base amount and clearing date are the fields name.

I have written the following for YTD on Discount Amount:

Discount base Amount YTD = TOTALYTD(sum(Query1[Discount_Base_Amount]), (Query1[Clearing_Date]))
I am trying to calculate the discount base amount YTD LY. Please guide.
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Hari19 ,

You can create a measure as below: 

YTD LY = CALCULATE([Discount base Amount YTD],SAMEPERIODLASTYEAR('Date'[Date])))

In additon, you can refer the following links to get it:

Get the YTD of the same period last year

Sales prev YTD =
TOTALYTD ( SUM ( Sales[sales] ), DATEADD ( ‘Calendar'[Date], -12, MONTH ) )

yingyinr_0-1665993337668.png

YTD (this year) vs YTD (last year)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Hari19 ,

You can create a measure as below: 

YTD LY = CALCULATE([Discount base Amount YTD],SAMEPERIODLASTYEAR('Date'[Date])))

In additon, you can refer the following links to get it:

Get the YTD of the same period last year

Sales prev YTD =
TOTALYTD ( SUM ( Sales[sales] ), DATEADD ( ‘Calendar'[Date], -12, MONTH ) )

yingyinr_0-1665993337668.png

YTD (this year) vs YTD (last year)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Hari19 , You have join a Clearing_Date with a date of the date table and then create a measure

 

Discount base Amount YTD = TOTALYTD(sum(Query1[Discount_Base_Amount]), (Date[Date]))

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors