Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
darrihilmarsson
New Contributor III

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

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Not applicable

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

try with dimension:

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

View solution in original post

4 Replies
Highlighted
Not applicable

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

try with dimension:

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

View solution in original post

Highlighted
darrihilmarsson
New Contributor III

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

Thanks Dariusz

You are genius

Highlighted
Not applicable

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

Darri,

you need 7500 points to be a Genius here

Highlighted
darrihilmarsson
New Contributor III

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

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