Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is this possible with QV ?

Hello,

i'm wondering if the situation in the attached excel-sheet is possible in QV.

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Even better with pivot table like this:

dimensions: "client" on left side, "product" on top side

expression: "=sum(price)", "=connectionnr"

This will provide the following display:

productelectricityelectricityenergyenergywaterwater
client=sum(price)=connectionnr=sum(price)=connectionnr=sum(price)=connectionnr
101,51031101--
11--1,251020,75105


View solution in original post

5 Replies
justinasp
Creator
Creator

Try this:

temp1:
load *inline
[
client, connectionnr, product, price
10, 101, energy, "1,00"
10, 103, electricity, "1,50"
11, 102, energy, "1,25"
11, 105, water, "0,75"
];
temp2:
load distinct
client
resident temp1;
left join
load client,
connectionnr as energy_connectionnr,
price as energy_price
resident temp1
where product='energy';
left join
load client,
connectionnr as electricity_connectionnr,
price as electricity_price
resident temp1
where product='electricity';
left join
load client,
connectionnr as water_connectionnr,
price as water_price
resident temp1
where product='water';


Not applicable
Author

Thanks a lot !

But is it possible to do this on object-level in stead of in a script ?

Personally, I think it's not possible......

Not applicable
Author

Why wouldn't you use a pivot table with "client" and "collectionr" as dimension on the left side (vertical), "product" on top side (horizontal) and "price" as expression?

clientconnectionnrproductelectricityenergywater
10101-1-
101031,5--
11102-1,25-
11105--0,75


Not applicable
Author

Even better with pivot table like this:

dimensions: "client" on left side, "product" on top side

expression: "=sum(price)", "=connectionnr"

This will provide the following display:

productelectricityelectricityenergyenergywaterwater
client=sum(price)=connectionnr=sum(price)=connectionnr=sum(price)=connectionnr
101,51031101--
11--1,251020,75105


Not applicable
Author

Thanks !

It's working.....