Tableau newbie here
I have 2 calculated fields
1. MTD with the formular
IF [Date] <= [Dated] AND DATEDIFF('month',[Date],[Dated])= 0 THEN [Sales] END
DATETRUNC('month', [Date]) =
DATETRUNC('month', DATEADD('month', -1,[Dated]))
DATETRUNC('day', [Date]) <=
DATETRUNC('day', DATEADD('month', -1,[Dated]))
I need to get the percentage difference between the 2 PMTD - MTD, I have created a calculated field for this in the using the formula
Its however not returning the expected result
ZN([MTD])/ZN([PMTD]) however returns the expected difference between the 2, i am not sure what goes wrong
I have attached my workbook
Found the issue..
I wasn't aggregating the calculated fields, did that i was good to go
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...