Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Contributor III

Limit the total amount of expression

Good morning.

I have a table where I have two fields that are grouped with their values.

tabela.JPG

Need to group on a chart table, the total price never pass 900.00.

If you arrive to 900.00 is created a new line with the rest and so on.

tabela2.JPG

If we were to limit for number of records could use a field with "div (rowno (), 900) + 1 the Group", but I'm willing to limit the sum of the values.

Can someone help me?

1 Solution

Accepted Solutions
Highlighted
Employee
Employee

Re: Limit the total amount of expression

Good correction

A better solution

rangemax(0,rangemin(900,Sum(F3)-(ValueLoop(1,10)-1)*900))

Capturar.PNG

View solution in original post

9 Replies
Highlighted
Employee
Employee

Re: Limit the total amount of expression

Please find attached one possible solution

Highlighted

Re: Limit the total amount of expression

Clever Anjos‌ I think this would need to be dynamic as what happens if this is the data:

LOAD * INLINE [

    F1, F2, F3

    13, 90, 100

    13, 90, 200

    13, 90, 100

    13, 90, 600

    13, 90, 100

    13, 90, 200

    13, 90, 100

    13, 90, 600

];

Correct me if I am wrong Marcio Arruda‌‌, but I think the solution then would be 900, 900, 200 in three rows

Highlighted
Employee
Employee

Re: Limit the total amount of expression

Good correction

A better solution

rangemax(0,rangemin(900,Sum(F3)-(ValueLoop(1,10)-1)*900))

Capturar.PNG

View solution in original post

Highlighted

Re: Limit the total amount of expression

Super with the second dimension changed to ValueLoop(1, 10)

Contributor III

Re: Limit the total amount of expression

First, thank you for your response.

I understand, but when you use really will not know beforehand what the total values nor how many rows will need to complete the full amount. Which lists need to be dynamic.

I made some changes and is an example where choosing jurisdiction is 12/2015 the value of the third row is negative.

Highlighted
Contributor III

Re: Limit the total amount of expression

Corrigir Sunny T

Highlighted
Contributor III

Re: Limit the total amount of expression

This solution is best.

Highlighted
Employee
Employee

Re: Limit the total amount of expression

We need to set a maximum, for example 100.

You can extrapolate, to 1.000 or 10.000, at the cost of performance

Highlighted
Contributor III

Re: Limit the total amount of expression

I understood Clever Anjos, but the way you did has served me.

Thank you so much.