Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
Please find the attached sample and it to has details of the problem.
Thanks,
Tab1:
Load *
INLINE [
ID, Year, "Quarter Year", Sales
1, 2011, Q1-2011, 1
2, 2011, Q2-2011, 3
3, 2011, Q3-2011, 4
4, 2011, Q4-2011, 1
5, 2012, Q1-2012, 5
6, 2012, Q2-2012, 12
7, 2012, Q3-2012, 13
8, 2012, Q4-2012, 14
9, 2013, Q1-2013, 21
10, 2013, Q2-2013, 18
];
left Join
Load
'Q'&Mid([Quarter Year],2,1)&'-'&(Num(Mid([Quarter Year],4,4))+1) as [Quarter Year],
Sales as PrioSales
Resident Tab1;
There is no vaules in prioir of the 2011
Tresco I need the total sum of Year to ploted against each quarter of the next year.
That is waht I calculated PreSales. I want to achive it at UI.
Dear Sujeet,
Its always better to move the calculations at the script level.
I would recommended that you should try same logic as the example tresesco had given.
Regards,
Kaushik Solanki
I agree but a complex data models hinders all here.
Sujeet I agree too that it wont be as simple as it seems, but as a developer you should also think about end users performance.
Keeping heaving calculations like this, may kill your application when you will have huge data.
So try if you can accommodate the logic in script to reduce the performance.
Regards,
Kaushik Solanki
That can be done using a synthetic dimension and expression in combination with Pick() and Match(). That would be complex and with some disadvantages.
Hi Sujeet,
It is difficult to handle this in Front end because we cannot control the axis, show data for one quarter in another quarter in chart. It should be handled in Script only.
If there is a fixed number of quarters to display in the chart then we can do this easily by using synthetic dimension since it has no relation to the expression
Hope this helps you.
Regards,
Jagan.
Hi,
Try this script
Tab1:
Load
ID,
Year,
[Quarter Year], Sales
INLINE [
ID, Year, "Quarter Year", Sales
1, 2011, Q1-2011, 1
2, 2011, Q2-2011, 3
3, 2011, Q3-2011, 4
4, 2011, Q4-2011, 1
5, 2012, Q1-2012, 5
6, 2012, Q2-2012, 12
7, 2012, Q3-2012, 13
8, 2012, Q4-2012, 14
9, 2013, Q1-2013, 21
10, 2013, Q2-2013, 18
];
YearlySales:
Load
(Year + 1) as Year,
Sum(Sales) as PrioSales
Resident Tab1
WHERE Exists(Year, Year +1)
Group BY Year