Comparing Year-to-Date YTD vs Previous Year YTD in a Financial Dashboard

0 votes

Comparing Year-to-Date (YTD) vs. Previous Year YTD in a Financial Dashboard
You need to implement a dynamic Year-to-Date (YTD) vs. Previous Year YTD comparison in a financial dashboard. What is the best approach using DAX functions like TOTALYTD, SAMEPERIODLASTYEAR, or DATEADD to ensure accurate and responsive comparisons?

6 days ago in Power BI by Evanjalin
• 19,000 points
35 views

1 answer to this question.

0 votes

The approach to creating such a comparison will be using TOTALYTD for the current part of the year and SAMEPERIODLASTYEAR or DATEADD for last year's YTD numbers.

DAX Measures for YTD versus Previous YTD

1. Year to Date (YTD) Sales

Sales YTD = TOTALYTD( SUM( Sales[Revenue] ), 'Date'[Date] )

Incorporate TOTALYTD to derive the running total revenue from January 1 through the present date. Then, the data fact can be applied to any time intelligence.

2. Sales in the previous year YTD (using SAMEPERIODLASTYEAR)

Sales PY YTD = 
CALCULATE( 
    [Sales YTD], 
    SAMEPERIODLASTYEAR( 'Date'[Date] ) 
)

The date span will be modified one year back, during a similar time period. This guarantees an accurate YTD comparison without manual adjustments.

Alternative: Previous Year YTD Using DATEADD.

Sales PY YTD (DATEADD) = 
CALCULATE( 
    [Sales YTD], 
    DATEADD( 'Date'[Date], -1, YEAR ) 
)

If any custom shifts happen to be needed, such as for fiscal years, DATEADD gives flexibility.

Why this Approach?

Year-To-Date Calculations: Correctly accumulate totals throughout.

Works with Dynamic Filtering – Reacts with slicers and date selection.

Optimized for Performance – Efficient usage of out-of-the-box time-intelligence functions of Power BI.

answered 6 days ago by anonymous
• 19,000 points

Related Questions In Power BI

+1 vote
1 answer
0 votes
1 answer

Why does a reference to a value in previous row throw this Expression.Error?

If you have multiple steps after the ...READ MORE

answered May 9, 2019 in Power BI by Avantika
• 1,520 points
901 views
0 votes
1 answer

How to create a new dashboard by pinning visualizations from a report in Power BI?

Hey, I can show some steps wise steps ...READ MORE

answered Feb 6, 2020 in Power BI by Gitika
• 65,770 points
1,163 views
0 votes
1 answer
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,520 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,130 points
2,868 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,649 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited 6 days ago 1,795 views
0 votes
1 answer

What is the best approach to convert a Date/Time column to a Date data type in Power Query while using DirectQuery from SQL?

For DirectQuery, the best way to convert ...READ MORE

answered Feb 28 in Power BI by anonymous
• 19,000 points
50 views
0 votes
1 answer

I need to compute a year-over-year (YoY) growth rate but only for months where I have data in both years—how do I do this?

Calculating Year-over-Year (YoY) growth only for those ...READ MORE

answered 1 day ago in Power BI by anonymous
• 19,000 points
15 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP