Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone!!
I’ve developed an application and using valuelist function and pick match with it to create my dimensions and wrt that I’ve created measure for each subfield.
eg -
dimension measure
A - sum({< account=‘123’>}Sales)
B - sum({< account=‘786’, segment <> ‘67’>}Sales)
C - sum({< account={‘999’,’456’}, segment=‘12’>}Return)
And so on. I’ve created almost 100 + dimensions with different calculation and stored it in variable. Due to this it is taking more than 2 minutes to show the chart.
I need to calculate it in the backend so that it will fast in the front end.
Important thing is all the fields which are there in my set are coming from different tables.
How can i achieve the result in backend…
Your input will be very helpful for me.
Thanks in advance….
Hi
You have to create all calculation in script
PreAggregatedData:
LOAD
Account,
Segment,
Sum(Sales) AS TotalSales,
Sum(Returns) AS TotalReturns
RESIDENT SalesData
GROUP BY Account, Segment;
And created mapping tables
DimensionMapping:
LOAD * INLINE [
DimensionID, DimensionName, AccountFilter, SegmentFilter, MeasureType
1, A, 123, *, Sales
2, B, 786, <>67, Sales
3, C, 999|456, 12, Returns
];
Applymap using
FinalAggregated:
LOAD
DimensionID,
DimensionName,
If(AccountFilter='*' OR Account=AccountFilter, 1, 0) AS AccountFlag,
If(SegmentFilter='*' OR Segment=SegmentFilter, 1, 0) AS SegmentFlag,
If(MeasureType='Sales', TotalSales, TotalReturns) AS FinalValue
RESIDENT PreAggregatedData;
Front end
Sum(FinalValue)