Reputation: 157
I have the following question!
I have a line plot showing my completed applications per day.
I want to highlight weekends in a band like the picture below(It's from a plot on excel i think):
I have already create a metric which is:
IF DATEPART('weekday',[Order Date]) =1 OR DATEPART('weekday',[Order Date]) = 7
THEN "Weekend" ELSE "Not Weekend" END
But i don't know how to include that so i make a band with it.
Any help would be high appreciated! Thank you!
Upvotes: 0
Views: 1332
Reputation: 26218
I have done it like this..
Data - sample superstore
I have added one calc field, where 12000 is max value of my sales value for a given view
IF DATEPART('weekday',[Order Date]) =1 OR DATEPART('weekday',[Order Date]) = 7
THEN 12000 END
Adding this field to view (dual axix) and tweaking a little, I got
The only problem I see here that there are no bars where no order has been placed on weekends.
This however works perfectly where there are no nulls on dates like in your data. see working on my sample data.
Upvotes: 2