19 Replies Latest reply: Dec 26, 2017 11:42 AM by Sunny Talwar RSS

    Set Analysis - Exclude Selections Except

    Michael Rainey

      Two things:

       

      1) We recently upgraded to the latest release of Qlik Sense and we have and some problem with the Set Analysis doing the same thing from 3.2 to now.  Were there any big changes to how Qlik Sense reads the Set Analysis code?

       

      2) I know how to "Include all selections except":

           sum( {<CostCenterName= , CostCenterID= >} $(vSales))

      Is there a way to do it the other way?

           sum( total {<SIC= >} $(vSales))

      That doesn't work.

       

      I have a Pivot Table with Rows of CostCenterName and the SIC.  Measure is sum($(vSales)).

      I want to add another measure finding the percentage of sales that cost center does for each SIC they sell towards.

       

      Example:

      Cost Center: Baltimore

      SIC: Clothing

      Sales for Baltimore: 100k

      Sales for Baltimore Clothing: 5500

      Sales for Clothing: 200k

      Total Sales: 10M

      Baltimore Total %: 1%

      Baltimore Clothing %: 2.75%

       

      Displayed Like this in a pivot table:

       

      Baltimore                              100,000                         1%

           Clothing                            5500                              2.75%