I found this elseif statement in a Gantt Chart workbook in tableau and tried to replicate the Gantt Chart using my own data. Basically, the ifelse statement which includes the dateadd function is used to filter down a parameter. It is particularly not working when I change the parameter to "Last Month"
I've tried including Else "error", Else [Due] before the final END. Still showing null values.
If [Date Range]="This year" then [Due] elseif [Date Range]="This month" then (if month(today())=MONTH(Due) then [Due] end) elseif [Date Range]="Last month" then (if month((dateadd("month", -1, today())))=month([Due]) then [Due] end) END
Aucun commentaire:
Enregistrer un commentaire