you can change your "MONTH" dimension to date data type and add it to the work sheet
Then change it from year to Month and try your calculations,
Thank you for your quick response.
The Month is hard keyed at source, if I change in alteryx or tableau to
date format it turns the field to null.
I think the answer is I am going to have to put it in as the first day of
the month, I was hoping there might be a work around instead of me
changing the original process
If you require more information please do not hesitate to contact me
Tel: 01733 582331
Tie Line: 7-529-2331
Find my approach as reference below and stored in attached workbook version 9.3 located in the original threat
Step 1: Define "Month number
if [Month]="Jan" then 1
ELSEIF [Month]="feb" then 2
ELSEIF [Month]="mar" then 3
ELSEIF [Month]="apr" then 4
ELSEIF [Month]="may" then 5
ELSEIF [Month]="jun" then 6
ELSEIF [Month]="jul" then 7
ELSEIF [Month]="aug" then 8
ELSEIF [Month]="sep" then 9
ELSEIF [Month]="oct" then 10
ELSEIF [Month]="nov" then 11
ELSEIF [Month]="dec" then 12 END
Step 2: Define Date
Step 3: Define YTD
if DATEDIFF("year",[Date],today())=0 and DATEDIFF("month",[Date],today())>=0 then [Value] END
YTD statement_nalmai.twbx 35.3 KB
This is a very interesting approach.
Please do also see the links below on date parsing function available in tableau. This also could help
Thank you so much for this. I used the Dateparse and it worked.
However I am still struggling with creating a YTD value.
Can you share your workbook?