Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum and several select conditions

Hello,

i tried the whole day to get this done and didnt found anything useful. So i hope you can help me here with a link or solution.

I have a relation over 3 tables and want to sum a value with a condition on another field and distinct ids.

I made a table, which include alle the data:

forum.jpg

To get a number of the matching fields i made this: Count(DISTINCT{1<Validierungsergebnis={'Fehler'}>} [SchadenID]))

My problem:

How can i calculate the sum of the value "Schadenssumme" with distinct SchadenID and Validierungsergebnis={Ok'}?

I tried several aggr and sum versions. Mabye s.o. can help me thx a lot in advance

Binger

1 Solution

Accepted Solutions
swuehl
MVP
MVP

maybe like

=sum({<Validierungsergebnis = {'Ok'}>} aggr( only({<Validierungsergebnis = {'Ok'}>} Schadenssumme), SchadenID))

But I am not really sure what you want to achieve. Could you upload a more detailed explanation of your data model or input data and what you want to get as result?

View solution in original post

1 Reply
swuehl
MVP
MVP

maybe like

=sum({<Validierungsergebnis = {'Ok'}>} aggr( only({<Validierungsergebnis = {'Ok'}>} Schadenssumme), SchadenID))

But I am not really sure what you want to achieve. Could you upload a more detailed explanation of your data model or input data and what you want to get as result?