Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmark1990
Contributor III
Contributor III

Set analyses on a calculated field instead of normal field

I currently am working on a financial application where I display a straight table with the balance of each month.

When I select the value Liquide middelen in field BalansOmschrijving2 I get the correct table. The column Saldototaal is the expression SUM (Bedrag * isDebetBoeking) - SUM (Bedrag * isCreditBoeking).

A part of the correct table is:

1.png

My selection is:

2.png

How do I make the correct set analysis expression for this selection on the calculated field Saldototaal so the table keeps the same when I clear all selections?

The expression that I tried but resulted in a table with the number 0 is:

SUM ({$<BalansOmschrijving2 = {"Liquide.Middelen"}>} (Bedrag * isDebetBoeking) - (Bedrag * isCreditBoeking))

3.png

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum({$<BalansOmschrijving2 = {"Liquide.Middelen"}>} Bedrag * isDebetBoeking) - Sum({$<BalansOmschrijving2 = {"Liquide.Middelen"}>} Bedrag * isCreditBoeking)

Do you have . between the Liquide and Middelen? Doesn't seem like within the  current selection box... so may be you need this

Sum({$<BalansOmschrijving2 = {"Liquide Middelen"}>} Bedrag * isDebetBoeking) - Sum({$<BalansOmschrijving2 = {"Liquide Middelen"}>} Bedrag * isCreditBoeking)

View solution in original post

2 Replies
jensmunnichs
Creator III
Creator III

Are the fields 'isDebetBoeking' and 'isCreditBoeking' flags with a value of 0 or 1 indicating whether they should be taken into consideration in your calculation? Because in that case you could do this:

Sum({1<BalansOmschrijving2 = {'Liquide.Middelen'}, isDebetBoeking = {1}>} Bedrag) -
Sum({1<BalansOmschrijving2 = {'Liquide.Middelen'}, isCreditBoeking = {1}>} Bedrag)

Note: If this doesn't work, one tip is that using '1' in front of your set analysis will make the calculation ignore selections.
sunny_talwar

May be this

Sum({$<BalansOmschrijving2 = {"Liquide.Middelen"}>} Bedrag * isDebetBoeking) - Sum({$<BalansOmschrijving2 = {"Liquide.Middelen"}>} Bedrag * isCreditBoeking)

Do you have . between the Liquide and Middelen? Doesn't seem like within the  current selection box... so may be you need this

Sum({$<BalansOmschrijving2 = {"Liquide Middelen"}>} Bedrag * isDebetBoeking) - Sum({$<BalansOmschrijving2 = {"Liquide Middelen"}>} Bedrag * isCreditBoeking)