Sub Totals only if there is more then 1 element
Hello!
Is it possible to show the sub totals only if there are more then 1 element to calculate? Here is an example.
If there is only 1 element i'd prefer not to see the Subtotal.
Best regards,
Germann
1 reply
-
Hi ,
Unfortunately, this option is not available aa part of the subtotalling engine, but it should be, so please raise a feature request in the Product Ideas Forum.
You can however, create your own custom subtotal member. In my example I'm using our demo database. I want to count the number of rows detailing product returns and if they are greater than 1, generate a subtotal, otherwise produce nothing.
Build a calculation similar to the above, substituting Products for your inner dimension and your measure. Note that the calculation is placed in the Product dimension, not measures. This results in something like this:
You can see that because Australia and Germany only have one product in the query output, the sub-total calc is null and doesn't appear, whereas it is shown for United States that has more than one product in the output.
This works fine for a single measure, but where you may have multiple measures in the output, it needs to take those into account and the calculation will be a little more complex (in fact requires use of scripting mode), but is achievable.
Hope that helps!
Ian