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

Current Month Year and Previous Year Same Month

I am trying to use a pivot table to display an expression that show the balance on the Production date selected and then have a secondary expression that shows the balance on the year ago production date.

ex: A column for balance Oct - 2016 and then a balance Oct - 2015.

These expressions need to be dynamic though, and change so that when i select a date in Novemeber it would should Nov 2016 and Nov 2015.

The expression i am using for the current month & year is:

          sum({$<[Production Date]={"$(=max([Production Date]))"}>} [Current Balance])

The above expression works but i need an expression for Oct 2015 that is dynamic

1 Solution

Accepted Solutions
sunny_talwar

What is the format for Production Date here?

May be try this:

Sum({$<[Production Date]={"$(=Date(AddYears(Max([Production Date]), -1), 'DateFieldFormatHere'))"}>} [Current Balance])

View solution in original post

2 Replies
sunny_talwar

What is the format for Production Date here?

May be try this:

Sum({$<[Production Date]={"$(=Date(AddYears(Max([Production Date]), -1), 'DateFieldFormatHere'))"}>} [Current Balance])

Anonymous
Not applicable
Author

This worked thank you so much!