Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bellesol
Creator
Creator

Expression Small Problem

Hi,

I have been asked to create a pivot table that will show by month and year the following calculation:

[UnitAmount] * [PriceForUnit]

The final table that I would like to display is:

   Year20192019201920192019201920192019201920192019
ProductUnitAmountPriceForUnitMonthAprilAugustDecemberFebruaryJulyJuneMarchMayNovemberOctoberSeptember
A6220.1            1,320.6           1,320.6           1,320.6           1,320.6           1,320.6 0            1,320.6           1,320.6           1,320.6           1,320.6 0 
A12220.1            2,641.2           2,641.2 0            2,641.2 0            2,641.2           2,641.2           2,641.2 0  0  0 
A180  0  0  0  0  0  0  0  0  0  0  0 
A18220.1  0  0  0            3,961.8 0  0  0  0  0  0  0 

 

I create a dummy data:

LOAD * INLINE [
Product, UnitAmount, PriceForUnit, Month, Year
A, -18, 0, June , 2019
A, 6, 220.1, February, 2019
A, 6, 220.1, March , 2019
A, 6, 220.1, April , 2019
A, 6, 220.1, May, 2019
A, 6, 220.1, July , 2019
A, 6, 220.1, August, 2019
A, 6, 220.1, October, 2019
A, 6, 220.1, November , 2019
A, 6, 220.1, December, 2019
A, 12, 220.1, February, 2019
A, 12, 220.1, March , 2019
A, 12, 220.1, April , 2019
A, 12, 220.1, May, 2019
A, 12, 220.1, June , 2019
A, 12, 220.1, August, 2019
A, 18, 0, June , 2019
A, 18, 0, September, 2019
A, 18, 220.1, February, 2019
];

 

 

1 Solution

Accepted Solutions
Taoufiq_Zarra

Hi,

attached

Capture.JPG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

Hi,

attached

Capture.JPG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
bellesol
Creator
Creator
Author

Thanks!