#Tableau - Calculate YTD vs. Prior YTD Based on a Selected Date

preview_player
Показать описание
In this tip, I show you how I calculate year over year change based on a date selected with a parameter. The use case is to calculate YTD sales depending on the date selected and compare it to the prior YTD sales for the same period.

Рекомендации по теме
Комментарии
Автор

Did a great job of describing CYTD vs PYTD calculations in a short and simple manner! Super helpful video! Thank you

anthonyburns
Автор

Thank you. It's simple and easy to follow for beginners. Love this!

haniharun
Автор

Awesome simplicity involved here, love that calculation! Never would have thought about using the boolean like that.

mmmaxmmm
Автор

Thank You Andy, this solution works perfectly, very simple and precise. I have seen other solutions online but they are unnecessarily complex

SuperDhruv
Автор

Thanks! This gets complicated if the fiscal year does not start from January. QTD and MTD are a nightmare to build if say your Fiscal year starts from Feb.

farrukhkidwai
Автор

Great video. Just what i needed. I incorporated this with another video for adjusting to a specific fiscal year. Thanks!

dantheman-adadwithchores
Автор

Thanks for the post Andy. Our business deals with lengthy financial blackout periods. This solution lets us quickly get an apples-to-apples comparison just by selecting a date.

jacobblalock
Автор

Thank you Andy. This is exactly what I was looking for.👍

RajivPerera
Автор

You made it easy Andy!

I feel Tableau needs to offer readymade functions to do these calculations. just like how Power BI does it.

pravinjoshi
Автор

Solid approach to compare apples with apples when you want to compare the current date with the previous year. I would like to do it with the forecast tho and switching from both?

blackspitit
Автор

Thanks Andy, I learn new things from every tip that you post here.
Can we also do week day to last year week day visual comparison (like saturday week 10 vs saturday week 10 last year).

enter-mation
Автор

This is helpful! However, I am stuck with how to apply this to FYTD calculation - especially, how to create a field that is the current fiscal year start date, so that I can use that as my lower bound for if [order date]>= current fiscal year start date and [order date]<= the most recent full month last day, then sum up sales? Our fiscal year starts on 7/1. Any help on this would be helpful. I googled around and not too much posts are talking about FYTD calculation

yiyit
Автор

Hey Andy, instead of sales, lets say I wanted to input an average units per order value, how can I do that without getting the cannot mix aggregate and non aggregate error?

parvezshahid
Автор

This is helpful, I have a similar scenario and pulled out the YTD percentage for the last 3 years, I also wanted to display which records have been newly added/removed along with the YTD calculations, how is that possible

sunishhkv
Автор

Great video! Would you please do a video where the percentage difference font color would change to green if it's positive and red if it's negative?

TH-vwqn
Автор

This video was very helpful, but I have mutliple year data and there are measured values already established. What I need to see is if I run my report on any given date, and I'm using a specific range whether a calendar year or fiscal year ie I'm running a report today, the range of dates are 7.1 - 9.30 - I need assistance with muliple years data - not just 1 or 2 years.

newbs
Автор

This is great. The challenge I have is exclude the current month and my prior year calculates data including the same time current month. I would like to know how I can do it so it excludes last year the current month.

joelvargas
Автор

Great tip, Andy! I assume that using the same logic, we can create a start and end date parameter for year over year comparison?

Mustafawi
Автор

Hi @Andy, this is great video and i appreciate it. But how would i go about using Months instead of Specific Date to show the data? Thanks again

Superstarmamba
Автор

THANK YOU SO SO MUCH SIR, this is what i look for TT

andrea