Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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).

3 Replies
sunny_talwar

May be this:

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/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
MVP
MVP

Or maybe

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