Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community.
I need to show the next 4 weeks from today of planned data in a bar chart.
This is my expression for the data in the bar chart:
Count({$<[Date Type]={'Sales_Date'},Reference_Only={'No'},[#of Days Post Sale]=-{' '},Item={'Door','Latch','Key'}>}Sales)
I believe I do not have to do anything/modify the dimensions, I only have week of as my dimension.
Any help will be greatly appreciated.
Zoe-
What is your expression showing currently?
The expression is showing for the whole year. So I want to show only for the next 4 weeks
What is your date field called and what is it's format?
I am using Week of Year. The date field format is a two digit field for week number.
Hi Sunny.
I was able to get this to work but it is adding more weeks than I need (probably because I am using YearMonth in the formula):
Count({$<[Date Type]={'Sales_Dates'},Year,Reference_Only={'No'},Gateways={'Door','Latch','Key'},YearMonth={">=$(=Date(((Today())),'MMM YY'))<=$(=Date(AddMonths(Max(Today()),1),'MMM YY'))"}>}Sales)
If I try to modify it from...<=$(=Date(AddMonths(Max(Today()),1),'MMM YY'))"}>}Sales) to
...<=$(=Date(Week((Today())+4),'MMM YY'))"}>}Sales)
I get an error.
Help...
Try this
<$(=Date(WeekStart(Today(), 5), 'MMM YY'))"}>}Sales)
But this need to be compared to a date field and not YearMonth
Yea, I am using Week of Year in my Dimension and all other date fields are coming in through the date bridge hence the ...[Date Type]={'Sales_Dates'}
I used this for adding 6 months to the year (show 18 months in chart)
Count({$<[Date Type]={'Sales_Dates'},Year,Reference_Only={'No'},YearMonth={">=$(=Date(AddMonths(Max(YearMonth),-11),'MMM YY'))<=$(=Date(AddMonths(Max(YearMonth),6),'MMM YY'))"}>}Sales) and it works a charm.
I was thinking it would be easy enough to modify this for adding 4 weeks to today's date?
okay