Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
March 26 at 10am ET: See how Qlik drives growth and value in ISV segment - REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
KuppuswamyS
Contributor II
Contributor II

Sum of values from Jan to Dec for current year and last year in Pivot Table

Hello All,

      Can you please help how to sum Actual hours for current year(Jan to Dec) and previous year(Jan to Dec) and display it after plant column in the Pivot Table shown below?  Thank you.

KuppuswamyS_1-1606992047631.png

 

 

13 Replies
KuppuswamyS
Contributor II
Contributor II
Author

Hi Edwin, 

       Requirement is to show last year average hours and YTD average hours and current year months in columns.

       Please check the attached excel sheet. I'm using Pivot table chart to display months of current year,  last year average hours and YTD average hours in columns . 

         Thank you. 

edwin
Master II
Master II

normally, you cant have an expression outside of the pivots.  if you add the two expressions

Last Year Average Actual Hours YTD Average Actual Hours

it will be pivoted - you will get these for Jan, Feb, Mar, etc..

what you do is aggregate them and add them as dimensions.  this way the calculated value is not pivoted.  i adjusted the QVW to show you the total for prior year.  you can expand from that

edwin
Master II
Master II

 
KuppuswamyS
Contributor II
Contributor II
Author

Hi Edwin,

    It works, thank you.