5 Replies Latest reply on Mar 7, 2016 4:35 PM by Clara Siegel

# Changing the starting point of a particular graph in Tableau

Hi all,

I am trying to shift the starting point of a particular graph by 1 week but not able to do so. Below is the screenshot:

I am trying to move the red dot (graph) to week 02 and keeping the above graphs (orange,purple and blue) at the same place. I don't want to change the value just shift the red dot to Week 02 without moving the above ones.

Is there any solution for this?

Regards

• ###### 1. Re: Changing the starting point of a particular graph in Tableau

Hi Shivang Desai,

No this is not possible. Please post your  sample workbook ill try once

• ###### 2. Re: Changing the starting point of a particular graph in Tableau

Hi Shivang,

One way to do this is with a calculation. You could create a new field called "Shifted Date" and use this:

IF [Color] = "Red" THEN DATEADD('week',1,[Date]) ELSE [Date] END

Then replace the date field in your view, with this calculation.

Hope that helps!

Clara

• ###### 3. Re: Changing the starting point of a particular graph in Tableau

I am putting a condition like:

IF [Financial Year] = "2016/17" THEN DATEADDD('week',1,[Date_Financial Week]) ELSE [Date_Financial Week]) END

This throws me an error in calculation: "DATEADD is being called with (string, integer, string). did you mean (string, integer, datetime)?"

• ###### 4. Re: Changing the starting point of a particular graph in Tableau

So basically [Date_Financial Week] is the week in the columns and I am trying to shift the graph value for the 2016/17 based on that.

I hope you are getting what I am trying to say?

• ###### 5. Re: Changing the starting point of a particular graph in Tableau

Hi Shivang,

I think that what you've written should work - perhaps you need to delete the third "D" and second ")" ?

IF [Financial Year] = "2016/17" THEN DATEADD('week',1,[Date_Financial Week]) ELSE [Date_Financial Week] END

My other idea is if the field "[Date_Financial Week]" is currently formatted as a string, it could be changed to being a date (you can have date fields displayed as weeks). Or if you need to keep it as a string, you can do this:

IF [Financial Year] = "2016/17" THEN "Week 02" ELSE [Date Financial Week] END

Let me know if any of those ideas work. Good luck!

Clara

2 of 2 people found this helpful