Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Frnz,
I need to show last 12 Weeks sales. Here Week as Dimension, already i have week Filed.
Please help me to write expression in Week Dimension.
Like this ?
Hi Can you share sample data ?\
-Nagarjuna
You could use a condition within the dimension or the expression like:
sum({ YearWeek = {">=$(=max(YearWeek)-12)"}>} Sales)
that requires an appropriate field within a master-calendar. Possible is also to use a flag for these period. Many helpful links could you find here: How to use - Master-Calendar and Date-Values
- Marcus
you can use a set analysis in your expression.
SUM({<DATE_FIELD={"$(='>=' & Date(Today()-84))"}>} SALES_FIELD)
if your week field as number, may be try this..
=sum({<Week={'>=$(=max(Week,12))'}>}sales)
Couple of ways you can add only 12 weeks of data.
1. Add new field in the Master Calendar WeekNumber having 1, 2,3 4, 5, 6 .... for ascending week Number.
Simply add calculated dimension: IF( WeekNumber >= Max(WeekNumber)-12 , WeekNumber )
or
add to set analysis
Sum({<WeekNumber={">=$(=Max(WeekNumber)-12<=$(=Max(WeekNumber)"}>} Sales)
2. you already have data field in your app.
IF( DateField >= max(date) - (12*7) , WeekName )
Like this ?
Hi Frnz,
Thanks to all. Almost all expressions are useful.