Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Future Months Value

Hi Guys,

I've a table in below format, in which i've data available till Apr 2016 for each employee.

  

EmployeeMonthHeadcount
EdJan-20161
VincentJan-20161
SamJan-20161
EdFeb-20161
VincentFeb-20161
SamMar-20161
EdMar-20161
VincentMar-20161
SamMar-20161
EdApr-20161
VincentApr-20161
SamApr-20161

In frond end i want to set all the future months headcount as the headcounts for latest month available in the data. Something like below.

   

JanFebMarAprMayJuneJulyAugSepOctNovDec
Ed111111111111
Vincent111111111111
Sam111111111111

Is it possible to achieve the same using a set analysis expression or is there any other way to achieve this? Please help

Thanks in advance.

Labels (1)
1 Reply
settu_periasamy
Master III
Master III

Hi,

I think you need to look on "ValueList". I just created a sample based on your sample.


Dimension  : Employee

Calculated dimension :

=ValueList('Jan 2016','Feb 2016','Mar 2016','Apr 2016','May 2016','Jun 2016')


(I just created for 6 months, you can add more)


Expression:


Pick(Match(ValueList('Jan 2016','Feb 2016','Mar 2016','Apr 2016','May 2016','Jun 2016'),'Jan 2016','Feb 2016','Mar 2016','Apr 2016','May 2016','Jun 2016'),
sum({<Month={'Jan 2016'}>}Headcount),
sum({<Month={'Feb 2016'}>}Headcount),
sum({<Month={'Mar 2016'}>}Headcount),
sum({<Month={'Apr 2016'}>}Headcount),
sum({<Month={'$(=MonthName(max(Month)))'}>}Headcount),
sum({<Month={'$(=MonthName(max(Month)))'}>}Headcount))