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: 
d_koti24
Creator II
Creator II

Regarding Period Exp

Hi ,

i Have field period,

Periodsales
1/30/2015100
2/27/201550
3/31/2015500
4/25/2015200
5/29/2015150
6/01/2015100
6/02/2015015
6/05/201522
6/06/2015555
6/08/2015666
6/10/2015777

In bar chart i want show the all month end dates with current selection period

ex:

if i select 6/08/2015 in period

i want show bar chart with these values

1/30/2015  2/27/2015  3/31/2015  4/25/2015  5/29/2015  6/08/2015

if i select 6/10/2015 in period

i want show bar chart with these values

1/30/2015  2/27/2015  3/31/2015  4/25/2015  5/29/2015  6/10/2015

how to achive this?

Labels (1)
15 Replies
Anonymous
Not applicable

Take a variable:

VMaxPeriod=date(max(PeriodName),'DD/MMM/YYYY')

and then use Expression at chart level:

=sum({<PeriodName={'<=$(=VMaxPeriod)'}>}Amount)

d_koti24
Creator II
Creator II
Author

Thanks ...!

d_koti24
Creator II
Creator II
Author

Hi Sasi,

How to do same thing for quarter?

ex:

31/3/2015 10/06/2015

if select 08/06/2015

i want like this:

31/3/2015 08/06/2015.

regards,

koti

sasikanth
Master
Master

HI,

You can do the same with the above expression

=sum({<Period={'<=$(= MonthEnd(addmonths(max(Period),-3)))>=$(=MonthEnd(addmonths(max(Period),-4)))','$(=max(Period))' }>} sales)

d_koti24
Creator II
Creator II
Author

Hi Sasi,

Actuvally My period field contains  10months data.

so i want latest 3 quarters last date date and current selection date.

like this :

3/30/2015 6/30/2015 9/30/2015 and current selection date 10/05/2015

How to achive this?

sasikanth
Master
Master

hi

try something like this

=sum({<Period={'=$(=quarterend(addmonths(max(Period),-3)))','=$(= quarterend(addmonths(max(Period),-6)))','=$(= quarterend(addmonths(max(Period),-9))) ','$(=max(Period))' }>} sales)

but make sure that sales are available for all quarter ending dates