Skip to Content
0

Request for help with a "Max()" related problem...

May 01, 2017 at 09:32 PM

78

avatar image
Former Member

Hi all, thanks in advance for spanding time on reading my question!

I am trying to calculate a "max" value for a list of data in WebI however I can't figure out the right combination of Max() with either ForEach or In... I've tried many different combinations but never get what I'm looking for...

This is a heavily simplified example of the data I'm working with:

So, I'm looking to get 1 value (max of 'Duration') for each 'Parent Ticket'...

Could anybody on this community please help me out?

Thank you very much in advance!

Bernard.

webi-question.jpg (52.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

AMIT KUMAR
May 02, 2017 at 06:21 AM
0

try this.

=max(duration) in (parent ticket)

Makesure your duration object data type should be number.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Amit,

I feel so stupid now :-) - that worked... I am so sure I tried this before... could be that I tried the following:

=max(duration in (parent ticket))

and that didn't work as it gave me a MULTIVALUE

Thank you Amit... Really appreciated...

0
Former Member

And just one more question :-)

If I remove "CHILD TICKET" from the block, the overall result changes because of the missing dimension...

How could I still calculate the same value but by referencing the 'CHILD TICKET' dimension directly in my formula?

Thanks

0
AMIT KUMAR
May 02, 2017 at 05:45 PM
0

use Foreach.

=max(duration) foreach( child ticket) in (parent ticket)

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Amit,

with your suggestion, I get the same result as my "duration" result

0
avatar image
Former Member May 02, 2017 at 05:54 PM
0

Please ignore my previous comments... It doesn't work...

I get a "172.4" everywhere

I don't understand why - this was the behavior I've seen earlier and why I raised the question here...

Now, I got it to work because (in one of my previous trials) I had created an intermediate column between DURATION and MAX DURATION and added a 'runningmax'.

With the following formula: runningmax(duration;(parent ticket)) in the RUNNINGMAX column, I get:

I'm already happy that it works but I would like to understand why I need that intermediate step...

Any ideas?


Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I made a small mistake in my last sample sheet:

the last 2 numbers in Duration should be "8.43333333"

Like this:

0
Antonette Venter May 03, 2017 at 09:15 AM
0

Hello Bernard

What happens if you try this:

=Max([Duration] In ([parent ticket]))

Regards

Antonette

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Antonette,

Thanks for the suggestion - however that returns a "multivalue" error...

B.

0