Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have 24 months in barchart.
but want to show last 12 months only
how to limit the dimension?
PFA
if i selected the Week 15 mean i have the 24 weeks
but 1 st 12 weeks are history weeks last 12 weeks are forecast weeks
i want to show the last 12 weeks only
my expression is
=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={$(=Max(Week_UP))}>}Sales),0.00)
See this example
did you check what I shared with you?
Not sure but in your question you had mentioned 12 months, if you want last 12 weeks, and I can see you have week field in your model, did you try this -
=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={">=$(=Max(Week_UP)-12)"}>}Sales),0.00)
i don't want to modify the expression
i want to change the dimension limit
Check:
Script:
Sample_Int:
LOAD * INLINE [
Month, Sales
Jan-09, 55
Feb-09, 39
Mar-09, 33
Apr-09, 56
May-09, 55
Jun-09, 70
Jul-09, 57
Aug-09, 29
Sep-09, 34
Oct-09, 41
Nov-09, 12
Dec-09, 11
Jan-10, 24
Feb-10, 85
Mar-10, 99
Apr-10, 77
May-10, 85
Jun-10, 64
Jul-10, 61
Aug-10, 45
Sep-10, 62
Oct-10, 70
Nov-10, 59
Dec-10, 25
Jan-11, 86
Feb-11, 92
Mar-11, 67
Apr-11, 65
May-11, 39
Jun-11, 70
];
Sample:
Load
Date(Date(Date#(Month,'MMM-YY'),'DD-MM-YYYY'),'MMM-YY') as YearMonth,
Sales
Resident Sample_Int;
Drop Table Sample_Int;
For bar chart :
Dimension : YearMonth
Expresii: Sum({<YearMonth ={">=$(=Date(addmonths(Max(YearMonth), -12), 'MMM-YY')) <=$(=Date(addmonths(Max(YearMonth), -1), 'MMM-YY'))"} >} Sales)
Thanks,
AS
i have personal edition so i cant open the QVW files
if i selected the Week 15 mean i have the 24 weeks
but 1 st 12 weeks are history weeks last 12 weeks are forecast weeks
i want to show the last 12 weeks only
my expression is
=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={$(=Max(Week_UP))}>}Sales),0.00)
Sort your Dimension in descending order and then apply dimension limit
first 12.
or you can use
Presentation Tab--> Enable X-axis Scrollbar [12] ---> check Reversed
Through Dimension Limit I do not think you can fetch last 12 month data.
Dimension Limits are used when you want to show max or min value not for last 12 month Data.
I think Set Analysis is a better option for same