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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

embedded expressions

Hi,

My task is to select all existing values of the field Media regardless of a user's selection and then inside this set of values I should select only those media whose Budget >0 and count them those media.

The first step is to get all media regardless of a user's choice:

Expression1: {Media=}


The second step to get the media whose Budget >0:

Expression2: {<Media = {"=aggr(sum([Budget]), Media)>0"}>}


Now I need to calculate expression 2 inside expression 1.

Intersection '*' doesn't work.

Could you please advise something?

Thank you in advacne,

Larisa

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

you can try this one

=count({<Media=>}aggr(if(sum({<Media=>}Budget)>0,only({<Media=>}Media)),Media))

View solution in original post

3 Replies
MK_QSL
MVP
MVP

SUM({<Media ={"=SUM({1}Budget)>0"}>}Budget)

MayilVahanan

Hi

Try like this

{<Media = {"=aggr(sum( {<Media=>}[Budget]), Media)>0"}>}

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
lironbaram
Partner - Master III
Partner - Master III

you can try this one

=count({<Media=>}aggr(if(sum({<Media=>}Budget)>0,only({<Media=>}Media)),Media))