Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a data about
Year, Month, SalesAmount (StdUnits).
Now, my requirement is, i have to create a line chart with below expressions.
1. Dimension: Month
2. Expression: Sum(SalesAmount(StdUnits).
Question: as per my knowledge , MAT is the last 12 months total. for example, for month Jan 2016 , the MAT is sum of sales from Feb 2015 to Jan 2016
I have just created text with the expression "=sum({<Year={$(=max(Year))},Month={"<=$(=Max(Month))"}>}[Sales Amount (Std Unit)])+sum({<Year={$(=max(Year)-1)},Month={">$(=Max(Month))"}>}[Sales Amount (Std Unit)])". It is giving the correct total in text box.
If i use the same expression in my chart , it is not showing correctly.
I have data from 2014 May to 2016 Apr. So, if i select 2016 as my year, then it should show the chart dimension for
Jan, Feb, Mar, Apr. But it is showing all the months from Jan to Dec.
Actually it should show MAT for Jan, Feb, Mar , Apr.
Please help me in getting this MAT.
Note: I am using the qlikview personal edition. So, Please copy the code here as i am not able to open the qvw from my personal edition.
Attaching the sample data and qvw here.
Regards
Srinivas
Can you share an updated sample with the expected output?
I have attached the app.
Expected Output is :
selections:
Standard Units in (Measure field: The original Field is "Column 1" in data model)
and in TimeInterval, "MAT" should be selected
I have columns fields in the data as
Sales Amount (Std Unit)
Market Sales (Std Unit)
my calculation for Market Share is : Sales Amount (Std Unit)/Market Sales (Std Unit)
Evolution Index Formula is : current Year Market Sale / Previous Year Market Share
Chart expectation: X-Axis should display months from Apr 2016 to May 2015 (Data I have till apr 2016)
Y - Axis: It should show the evolution index when MAT is selected as the option in the field "TimeInterval"
You have provided the expression for displaying the data from Apr 2016 to May 2015. In that expression, the set analysis is showing the Year as static value.
Now, Evolution Index will be calculated based on the Current Year, and Previous Year. So, it is not possible with static value "Year" in set Analysis.
Please let me know if you want more info on this.
Regards
Srinivas