Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using pivot table a follows:
* CustomerID as row dimension.
* ActionCode as column dimension.
* Cost as single measure. The measure including set analysis the master item:
{<GroupName={'AAA'}, ActionCode={1, 2, 3, 4, ....}>}[CostEx]
I want to display in the pivot only the customers who have more than one code with cost (by meausre) greater than 10.
*Edit* - I need to add a dimension next to each ID that shows the number of codes with cost above 10. This way the user will be able to filter/sort. But show only thise with more than one code above 10.
I tried several dimension (replaced CustomerID), It show me that the dimension is OK, but still shows 'Invalid Dimension' error.
So I need your help.
Dataset for example:
CustID 11111: Code 1 - 20, Code 2 - 5, Code 3 - 70, Code 4 - 0 => 2 codes over 10 => Customer Display.
CustID 22222: Code 1 - 5, Code 2 - 10, Code 3 - 0, Code 4 - 50 => 1 code over 10 => Customer NOT Display.
CustID 33333: Code 1 - 0, Code 2 - 0, Code 3 - 0, Code 4 - 0 => no code over 10 => Customer NOT Display.
CustID 44444: Code 1 - 10, Code 2 - 5, Code 3 - 15, Code 4 - 10 => 1 code over 10 => Customer NOT Display.
CustID 55555: Code 1 - 15, Code 2 - 0, Code 3 - 12, Code 4 - 30 => 3 codes over 10 => Customer Display.
Thanks!
Not sure what exactly you tried, but it sounds like you need to use something like:
Count(Aggr({<GroupName={'AAA'}, ActionCode={1, 2, 3, 4, ....}>}[CostEx],CustomerID, ActionCode ))
You may need a second aggregation outside the count to make this behave as expected in the pivot, in which case you'd just aggregate based on CustomerID.
Note that your expression seems to be missing an actual aggregation, so it's hard to be sure what's happening.
I would tend to do the essential work within the data-model, for example by using range-min/max/sum/count() and/or aggregations and/or interrecord-functions like peek/previous in appropriated sorted resident-loads and/or querying the results of something like: sign(CodeField - 10). And on top may come n flag-logic which are then used as dimensions and/or conditions.
There are many possibilities - which might look a bit heavy for the questioned view but if there are more similar views respectively they would provide an added value it would be worth the efforts.
I tried doing that, and it always showed "Invalid Dimension".
This is the closest I got -
You may try: