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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.