Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
try with dimension:
=aggr(MaxString(TOTAL <[Console Job]> [Container Type]),[Console Job],[Job number])
try with dimension:
=aggr(MaxString(TOTAL <[Console Job]> [Container Type]),[Console Job],[Job number])
Thanks Dariusz
You are genius
Darri,
you need 7500 points to be a Genius here
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 Job | Job number | Revenue | Cost | Container | Container Type |
AARS10 | AARS10 | 0 | 3500 | 3 | 40HC |
AARS10 | AARS11 | 1500 | 0 | 0 | - |
AARS10 | AARS12 | 2500 | 0 | 0 | - |
IMMS10 | IMMS10 | 5000 | 3000 | 1 | 40HC |
IMMS10 | IMMS10 | 5000 | 3000 | 1 | 20DC |
IMMS10 | IMMS10 | 5000 | 3000 | 1 | 40DC |