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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis not retaining total

Hi all

I have a number of properties and can create a percentage of current selection / total properties

=sum(PropertyIDCounter)/sum({1}PropertyIDCounter)

I also have a bookmark that filters the total properties into a specific group and I want to work out the percentage based on this bookmark

=sum(PropertyIDCounter)/sum({$*BM05}PropertyIDCounter)

However, when I apply a filter to the data the sum({$*BM05}PropertyIDCounter) also reduces

How do I apply the {1} effect in the first expression that retains the full count of the bookmark regardless of subsequent applied filters

Thanks in advance

John

1 Solution

Accepted Solutions
Not applicable
Author

Hi

Got it

just took out the $*

=sum(PropertyIDCounter)/sum(Total{BM05}PropertyIDCounter)

Thanks for your help

John

View solution in original post

7 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try using with the TOTAL keyword.

    

     =sum(PropertyIDCounter)/sum(Total {$*BM05}PropertyIDCounter)

Celambarasan

Not applicable
Author

Hi Celambarasan

Thanks but it still reduces the total when filters are applied to the dashboard

I thought it might be something to do with ticking the 'apply bookmarch on top of current selection' tick box but I still get the same outcome

John

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think you need to apply bookmark for both .

   

     =sum({$*BM05}PropertyIDCounter)/sum(Total {$*BM05}PropertyIDCounter)

Celambarasan

Not applicable
Author

Hi

Sorry that does not fix it

The problem appears to be in the Bookmark part of the expression

If no filters are applied

=sum({$*BM05}PropertyIDCounter) returns the correct quantity  ie: as if the bookmark was applied

However as soon as filters are applied the sum({$*BM05}PropertyIDCounter)  amount reduces

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     FRom this which one your expecting

    

     =sum({$+BM05}PropertyIDCounter)/sum(Total {$+BM05}PropertyIDCounter) this gives bookmark selection + current selection results.

             

     =sum({$*BM05}PropertyIDCounter)/sum(Total {$*BM05}PropertyIDCounter) this gives common in both bookmark selection and current selection results.


     =sum({BM05}PropertyIDCounter)/sum(Total {BM05}PropertyIDCounter) this gives only the bookmark selection results.

Celambarasan



Not applicable
Author

I have a simple QVW file that demonstrates the issue

I do not see a way to attach it other than starting a new discussion - is that correct?

John

Not applicable
Author

Hi

Got it

just took out the $*

=sum(PropertyIDCounter)/sum(Total{BM05}PropertyIDCounter)

Thanks for your help

John