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: 
edemerdjieva
Partner - Creator
Partner - Creator

Sum: exclude dimension null values

Hello all,

I have a chart that displays total of sales by business unit for a marketing campaign. In the data set there are sales which are not concerned by the marketing campaing. So I need to exclude these sales from the KPI calculation. This is the equivalent of "Delete null value" option of a dimension. However, I don't have the dimension in question in the chart.


Is there a way to do this in Set Analysis?

Capture.JPG

Capture2.JPG

Here is the expression of the total sales amount (CA Net TTC):

=Sum(Aggr(Sum(TOTAL <Ticket> [CA Net TTC Devise Support]),Ticket,[Code Action marketing]))

Thanks in advance for your advice!

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

just add a set analysis on the last Sum to exclude the values you want, like this:

=Sum( {<Field-={'values to exclude'}>}  Aggr(Sum(TOTAL <Ticket> [CA Net TTC Devise Support]),Ticket,[Code Action marketing]))

View solution in original post

5 Replies
YoussefBelloum
Champion
Champion

Hi,

just add a set analysis on the last Sum to exclude the values you want, like this:

=Sum( {<Field-={'values to exclude'}>}  Aggr(Sum(TOTAL <Ticket> [CA Net TTC Devise Support]),Ticket,[Code Action marketing]))

edemerdjieva
Partner - Creator
Partner - Creator
Author

Thanks Youssef!

It worked fine:

{<[Code Action marketing]-=''>}

YoussefBelloum
Champion
Champion

You're welcome

Don't forget to close the thread by marking correct and helpul answers.

Good luck

edemerdjieva
Partner - Creator
Partner - Creator
Author

Not sure how to do this.

I marked "Correct answer". Is it closed now?

YoussefBelloum
Champion
Champion

Yes, it is in green