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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis question

= if(DISTINCT{$<InnbetalingsStatus={'Har innbetalt'}>}AKTORID_FS_LOPENR) Avg([#ReskontroInnbetaltBeløp])*-1

Hi,

Why does not this Expression work?

I want to see the average payment (#reskontroinnbetaltbeløp) amongst donors that has made at least one payment (har innbetalt).

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

May be this:

Avg({<InnbetalingsStatus={'Har innbetalt'}>} [#ReskontroInnbetaltBeløp]) * -1

kaushiknsolanki
MVP
MVP

Hi,

its because If statement do not allow set analysis.

Set analysis should be used with aggregation functions.

correct expression will be.

Avg({<InnbetalingsStatus={'Har innbetalt'}>}AKTORID_FS_LOPENR)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
swuehl
Champion III
Champion III

Or maybe

=Avg({<AKTORID_FS_LOPENR = p({$<InnbetalingsStatus={'Har innbetalt'}>}) >} [#ReskontroInnbetaltBeløp])*-1