During a post-processor evaluation, I need to refer to the underlying lines to get data that cannot be aggregated.
Say my cube schema is composed of fields from 3 stores, A, B and C. It will then looks something like:
<datastoreSelection baseStore="storeA">
<fields>
<field name="fieldAmount1" expression="fieldAmount1" />
<field name="fieldAmount2" expression="fieldAmount2" />
<field name="fieldRefValue" expression="fieldRefValue" />
<field name="fieldForDimension1" expression="storeB/fieldForDimension1" />
<field name="fieldForDimension2" expression="storeC/fieldForDimension2" />
</fields>
</datastoreSelection>
My cube has 2 dimensions:
- dimension1 based on "fieldForDimension1"
- dimension2 based on "fieldForDimension2"
I have my post-processor that compare fieldRefValues to some external value 'externalValue' (let's assume this external value is a context value that users can change).
if (fieldRefValues <= externalValue) {
return fieldAmount1;
} else {
return fieldAmount2;
}
Since externalValue can vary on the fly, I cannot pre process this if section. I also cannot work on aggregated level (or more precisely, there is an interval where I have to work on detail lines).
Working on ActivePivot v5, it seems there is no such element as the indexer. Moreover, my humble knowledge on datastore makes me think that it may not fill my need for my schema is composed of fields from multiple stores. In other words, I haven't find a way to query datastore with a location.
For example, if a query on my PP comes with a location
[[myPP][value1][value2]]
I will struggle to retrieve detail lines using datastore queries, For I would have to:
- query storeB to get id of "value1"
- query storeC to get id of "value2"
- query storeA with results from the 2 previous queries
- performing my "if" statement on those lines
Quite complicated, isn't it?
In the meantime the drillthrough functionality does a similar job efficiently. So I ended up with the idea of using the drillthrough to get the retrieving job done.
However, I never heard of such use case. Hence my questions: Does someone has a similar use case and how did you solve it? Is there any caveat?
From my first attempts, it seems that performing a drillthrough query during a post processor execution can raise issue relative to context.