I think i did so crazy, kindly look below: is this best practice for previous year QTD calculation?
then [Volume from measure]
1 of 1 people found this helpful
There are usually more than one way to solve a problem in tableau
I am partial to datetrunc (it returns an actual date) in this case the first date of the quarter
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Thanks for your swift response....It's actually work for only 4th quarter of the previous year and i still have little discrepancy with my figure when i validate.
someone also told me to use these...returns the same as u provide. which was a diff of (-1) from mine.
IF [date]<= TODAY() AND
DATEPART('quarter', [date]) = DATEPART('quarter',TODAY()) AND
YEAR([date]) = YEAR(TODAY())-1 THEN
it works for the 4th quarter because it is linked to today() as is your calculations
what are your trying to do? are you trying to look at a running Q over Q?
please post your workbook in twbx format with the data so we can better understand the goal
Kindly look at the attached and see the previous year QTD and previous QTD1 calculation and verify please.
It's only shows for quarter one in the previous year. couldn't see the rest of the quarter.