Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to add data/value in the expression not in the script

Hi, QV community

I need to some help to add data in the expression.

I have an example for you guys to see.

I will talk about the example because you understand better if you look at it.

First take a look at the example before read my explanation.

One Job Number (AARS10) which is the same number as the console Job has information about the cost and Container Type.

The other Job Numbers (AARS11 and AARS12) have information about the revenues and nothing about the container type as you can see in the QlikView file.

I need the to get the same Container Types value in all my jobs. So when I filter Container Type "40HC" I will get all the jobs not only AARS10.

My it is possible to use the Consol Job number

Any ideas?

The solution below is correct if I would wan to do add the data in the script but I am looking for the same solution in the Chart Properties


Temp:

LOAD [Console Job],

     [Job number],

     Revenue,

     Cost,

     Container,

     if([Job number] = [Console Job], [Container Type], Peek([Container Type])) as [Container Type]   

FROM

[Example QV.xlsx]

(ooxml, embedded labels);

1 Solution

Accepted Solutions
Not applicable
Author

try with dimension:

=aggr(MaxString(TOTAL <[Console Job]> [Container Type]),[Console Job],[Job number])

View solution in original post

4 Replies
Not applicable
Author

try with dimension:

=aggr(MaxString(TOTAL <[Console Job]> [Container Type]),[Console Job],[Job number])

Anonymous
Not applicable
Author

Thanks Dariusz

You are genius

Not applicable
Author

Darri,

you need 7500 points to be a Genius here

Anonymous
Not applicable
Author

Hi, Dariusz

thanks for the answer. It was the answer I was looking for.

But I have a problem because sometimes the same Job Number have many different Container Types. (see the data below)

When I use your expression I run into problems because as you know the MaxString function reads the first container type. Do you have any ideas?

Console JobJob numberRevenueCostContainerContainer Type
AARS10AARS1003500340HC
AARS10AARS11150000-
AARS10AARS12250000-
IMMS10IMMS1050003000140HC
IMMS10IMMS1050003000120DC
IMMS10IMMS1050003000140DC