Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
So, pretend I'm looking at sales of an item vs time. One item I started selling 3 years ago and one is from only a year ago.

I want to look at how the performance of both items changes starting from the first date sold as "day 0" not from the first date sold as say "march 2016".

My date field is a calendar date and I'm not sure the best way line everything up from within tableau that will allow me to display the result on a single graph. I'd also like an option that will scale to 10+ items

Any approaches would be great!

1 Answer

0 votes
by (47.2k points)

  • Create a calculated field called first_Sale_date_per_item defined as {fixed Item : min(sale_date)}

  • Then you can define days_since_first_sale as datediff('day', first_sale_date_per_item, sale_date)

Related questions

0 votes
1 answer
asked Dec 9, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...