Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Discussion Board for collaboration related to QlikView App Development.

- Qlik Community
- :
- All Forums
- :
- QlikView App Dev
- :
- AGGR Fuction

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

erivera10

Creator

2017-11-28
07:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

AGGR Fuction

Hi,

I need help, I have this por expression Double,

IF(SUM(AGGR(sum(Amount),Group))>9,

Sum(Aggr(sum(9),Group)),

Sum(Aggr(sum(Amount),Group)))

and this por Triple

IF(SUM(AGGR(SUM(Amount),Group))<9,0,

Sum(Aggr(Sum(Amount)-9,Group)))

I have this natural table:

Group | Amount |
---|---|

A | 1 |

A | 2 |

A | 4 |

B | 2 |

B | 3 |

C | 1 |

C | 4 |

D | 4 |

D | 6 |

E | 5 |

E | 6 |

F | 1 |

F | 2 |

F | 3 |

F | 4 |

But I need to separete de data of the Amount, for example, Sum Value F is 10, so for doubles is 9 and for Triples 1,

the maximum for Doubles is 9, and Triples don´t have limits,

The total results are this

Group | SUM(AGGR(SUM(Amount),Group)) |
---|---|

48 | |

A | 7 |

B | 5 |

C | 5 |

D | 10 |

E | 11 |

F | 10 |

And Amount in Doubles and Triples need to be this

Group | Dobles | Triples |
---|---|---|

63 | -6 | |

A | 7 | 0 |

B | 5 | 0 |

C | 5 | 0 |

D | 9 | 1 |

E | 9 | 2 |

F | 9 | 1 |

But the total sum not is true, Doubles=44 and Triples=4, I don´t Found the solution, and subsequently, I will to do a chart whit the velocimeter, Thanks a lot.

873 Views

1 Solution

Accepted Solutions

sunny_talwar

MVP

2017-11-28
08:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Suggest to slightly simplify the expressions

Doubles

**=Sum(Aggr(RangeMin(9, Sum(Amount)), Group))**

Triples

**=Sum(Aggr(RangeMax(0, Sum(Amount)-9), Group))**

693 Views

4 Replies

2017-11-28
08:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Attached

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

sunny_talwar

MVP

2017-11-28
08:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Suggest to slightly simplify the expressions

Doubles

**=Sum(Aggr(RangeMin(9, Sum(Amount)), Group))**

Triples

**=Sum(Aggr(RangeMax(0, Sum(Amount)-9), Group))**

694 Views

erivera10

Creator

2017-11-29
12:24 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Sunny,

Thanks a lot, its working, and very simple.

693 Views

erivera10

Creator

2017-11-29
12:24 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Anil,

Thanks a lot, its work, too.

693 Views