# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
New Contributor

## sum(A) where B = Max(B)

If I replace Max(B) with the maximum value of B in the following line.

Sum({\$<B={Max(B)}>}A)

It Works as desired but the Max value of B can change and it is not practical to update manually

Tags (3)
1 Solution

Accepted Solutions
MVP & Luminary

## Re: sum(A) where B = Max(B)

If you only need to consider one value for max(B), you can do

Sum({\$<B={\$(=Max(B))}>}A)

If you need a different max(B) for each dimension row, you'll need to code it as:

Sum(If(B=aggr(max(B), dimension), A)

where dimension is the chart dimension(s)

-Rob

http://qlikviewcookbook.com

3 Replies

## Re: sum(A) where B = Max(B)

If you want to make consultant for irrespect of filters you need {1}

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)
MVP

## Re: sum(A) where B = Max(B)

Try a dollar sign expansion

Sum({\$<B={\$(=Max(B))}>}A)

MVP & Luminary

## Re: sum(A) where B = Max(B)

If you only need to consider one value for max(B), you can do

Sum({\$<B={\$(=Max(B))}>}A)

If you need a different max(B) for each dimension row, you'll need to code it as:

Sum(If(B=aggr(max(B), dimension), A)

where dimension is the chart dimension(s)

-Rob