Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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
Highlighted

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
Highlighted

What expression/s are you using right now?

Highlighted
Contributor III
Contributor III

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

Highlighted

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

Highlighted
Contributor III
Contributor III

Amazing! Thank you so much.