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

Problem in straight table using set analysis.

I'm using the following example expression:

count({$<Status = {'Paid'},  Strike_Date -= {"<$(=vBank_Date)"}>} Amount)

It's hard to fully explain what this expression does, but it works.


Problem

I'm using a ContractID as a dimension. My variable /expression only works correctly when I select an individual contract number, it does not work in the chart. In the chart it just counts all the payments made per contract, instead of what I'm specifying.

How can I force this expression over each contractID instead of having to select a contract?

Kind Regards,

1 Solution

Accepted Solutions
p_verkooijen
Partner - Specialist
Partner - Specialist

You need to use AGGR

SUM(AGGR(

         count({$<Status = {'Paid'},  Strike_Date -= {"<$(=vBank_Date)"}>} Amount)

        , contractID

        )

Also take a look at

QlikView Technical Brief - AGGR.docx

Also keep in mind that Set Analysis is performed before the chart calculation.

The used variable vBank_Date will be calculated as a overall date, not a date per contractID .

View solution in original post

3 Replies
p_verkooijen
Partner - Specialist
Partner - Specialist

You need to use AGGR

SUM(AGGR(

         count({$<Status = {'Paid'},  Strike_Date -= {"<$(=vBank_Date)"}>} Amount)

        , contractID

        )

Also take a look at

QlikView Technical Brief - AGGR.docx

Also keep in mind that Set Analysis is performed before the chart calculation.

The used variable vBank_Date will be calculated as a overall date, not a date per contractID .

tresesco
MVP
MVP

How is your variable vBank_Date defined? Could you post a sample qvw?

jagan
Luminary Alumni
Luminary Alumni

Hi,

I think the issue is with the variable vBank_Date you used in the expression, check whether it returns single or multiple or it is returning a valid date?

Regards,

jagan.