Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
zakpullen
Creator
Creator

Include dimension values from selected month and previous month

Hi,

The dimension 'Position' is made up of unique id numbers, each having a value between 0 and 1. This value can change by month. I want to compare values for each position for the selected month and the previous month. This is straightforward, except that position numbers that existed last month, but not in the selected month are not included.

How can I include positions that existed last month, but not this month?

Many thanks.

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be try this for previous month

Sum({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>} Aggr(Max({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}[Position FTE]), Position))

View solution in original post

4 Replies
sunny_talwar

What expression/s are you using right now?

zakpullen
Creator
Creator
Author

Selected month:

sum(aggr(Max([Position FTE]),Position))

Previous month:

sum({<MonthYear={">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}aggr(Max([Position FTE]),Position))

Thanks

sunny_talwar

May be try this for previous month

Sum({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>} Aggr(Max({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}[Position FTE]), Position))
zakpullen
Creator
Creator
Author

Amazing! Thank you so much.