Hello!! Hope this message finds you well!!
If I understand well, my suggestion is do something like:
Firstly, create a calculated field to ensure only the desired values are summed. For instance, if you want to assign the value 1 to “beta” and 2 to “gama”, you can use a formula such as:
ifelse( {Category} = 'beta', 1, {Category} = 'gama', 2, 0 )
This formula assigns 1 to “beta”, 2 to “gama”, and 0 to all other categories, ensuring that only the relevant values are considered during the drill-down process.
Next, configure the drill-down functionality to utilise this calculated field. This ensures that the bars in your visualisation display the correct values when you drill down into the data.
To manage the aggregation when drilling up, you can use parameters to define the logic for summing values based on the drill level. For example, you might set up a parameter to differentiate between drill-down and drill-up levels, and use a formula like:
ifelse( ${drillLevel} = 'up', sum({OriginalValues}), sum({CalculatedValues}) )
Here, ${drillLevel}
is a parameter that identifies the current drill level. When drilling up, the formula sums the original values, while drilling down sums the calculated values.
Finally, ensure that your visualisations are properly configured to reflect these calculations and parameters. This will allow you to display the correct values at each drill level, whether you are drilling down to see specific values or drilling up to view the sum of original values.
Well, I think that following these steps, you can effectively control the summation of values in qs drill-down and drill-up functionality, ensuring your data visualisations are both accurate and meaningful.