Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
aetingu12
Creator
Creator

Pivot table calculations

Dear all,

Is there a way to add calculated columns on a pivot table? ie I have one dimension of products and one dimension of dates and an expression of sales.

The products are the first columns, dates are across on the top giving me the sales by date. On the very last columns following the latest date, I want to calculate a movement between the latest available date (in dimension) and the prior one.

So I would like to be able to show the historic sales plus the latest change.

Here is the code:

LOAD * INLINE [
    Product, Date, Sale
    A, 31/01/2019, 100
    B, 28/02/2019, 150
    A, 28/02/2019, 50
    B, 31/01/2019, 200
    A, 31/03/2019, 50
    B, 31/03/2019, 200  
];

Pivot table:

Screenshot 2019-01-16 at 20.43.30.png

Ask is:

Screenshot 2019-01-16 at 20.43.15.png

Is this doable?

Regards,

Labels (2)
2 Replies
shiveshsingh
Master
Master

Please share sample data and expected output.

aetingu12
Creator
Creator
Author

Just added an excel image to explain the output