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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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?

1 Solution

Accepted Solutions
sasikanth
Master
Master

HI , please find the attachment

View solution in original post

15 Replies
Mark_Little
Luminary
Luminary

Hi,

One possible method would to use a variable.

vSelectedDate

=GetFieldSelections(Period)

Then in your expression use something like below

=SUM({1<Period={"<=$(vSelectedDate)"}>}sales)

Mark

maleksafa
Specialist
Specialist

Hi,

Please check the attached example on your data set. you need to modify the expression and use the possible P() in the set analysis.

d_koti24
Creator II
Creator II
Author

Hi Malek,

Thanks for quick response...!

but

I want all the month ends in a bar as well as current selection in this month.

maleksafa
Specialist
Specialist

what do you mean by month ends? is it the highest value per month, or you want to accumulate up to the selected date?

Anonymous
Not applicable

If I am not wrong, you want whatever period you selects, it should give all the data of periods which is less than or equal to your current selection?

d_koti24
Creator II
Creator II
Author

Highest value of month(.max date )

sasikanth
Master
Master

HI,

Take Dimension "PERIOD"

write exp like

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

Hope it will helps you

d_koti24
Creator II
Creator II
Author

Hi Sasi ,

can you please attach the sample qvw.

sasikanth
Master
Master

HI , please find the attachment