Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

wonkymeister
Not applicable

Set Analysis – summing value depending on selected periods

I have a summing up issue!!!

I have a selector box of values 1 – 12 (periods)

Loaded into qilkview I also have days per period i.e. period 1=31 days, period 2=28 days ,period 3=31 days etc…

What I’m trying to achieve is to sum the daysPerPeriod depending on the periods selected (or even better to remove user input and to sum the total days for the total periods currently available for the max year)

I’ve tried hardcoding the year and periods available into a variable to pull back the total days but get crazy numbers.

What I really want to do is to sum(daysPerPeriod) where Year = max(Year) and Period = total periods available for year selected

any help greatly appreciated

daysPerPeriod
Year
Period
312012

1

3820122
3120123
3020124
3120125
3020126
3020127
3120128
2 Replies
wonkymeister
Not applicable

Re: Set Analysis – summing value depending on selected periods

i should add that i've tried this hardcoded

=Sum({<Staff.Academic_Year={$(vYear)},Staff.Academic_Month = {$(vMaxPeriod)} >} 

  Number_of_Days_in_Period)

manideep78
Not applicable

Re: Set Analysis – summing value depending on selected periods

Try this

Sum({$<Staff.Academic_Year={"$(=Max(Year))"},Staff.Academic_Month={''}>} No_of_Days_in_Period)

See attached qvw