Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
vaibhavrc09
Contributor
Contributor

Dynamic Grouping and Subtotal percentage

I have a scenario

Measure assume : Sum(Sales)

A: Root level : One Value is selected from the dashboard 
                            This is the main total for all further calcs

B: Level 2 : One Value is selected from the dashboard

                       Associated value should be shown.

                       Unassociated should be grouped into Others.

C: Level 3  :  Associated value should be shown.

                        Unassociated should be grouped into Others.

😧 Level 4 : 

                       Associated value should be shown.

                       Unassociated should be grouped into Others.

I have to calculate sum(Sales) and % Total for each level using a pivot table.

Can someone help me on this scenario

Labels (1)
1 Reply
barnabyd
Partner - Creator III
Partner - Creator III

G'day, this idea is called "Brushing" and I think the best way to do this is with Set Analysis. In the help page, you can find an example expression which gives you what you're looking for ...

sum( {1-$} Sales ) Returns sales for everything excluded by the selection.

 

The % total would be something like this ...

sum( Sales ) / sum( total Sales )

or

sum( Sales ) / sum( {1} Sales )

I hope this help.

Cheers, Barnaby.

Barnaby Dunn
BI Consultant