Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
joris_lansdaal
Contributor

Help - WeekEnd or MonthEnd for daily projections

Hi All,

I've got a fairly simple challenge but don't know how to tackle it. My dataset contains a fact 'Projectie' .For every 'Datum' there's a projectie (projected stock level). I want to show a table with the projection for the end of the week or end of the month.

I want to use WeekYear or MonthYear from my mastercalender.

Projectie.PNG

What approach can i best take?What set analysis do i use?

Sum({<ReplenishFlag={1}>}Projectie)  will sum all value's instead of displaying one value.

Thanks for the help!

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Help - WeekEnd or MonthEnd for daily projections

What about creating a flag in your master calendar (for week end and month end separately), then use this flag in your set expression?

edit:

You can use GetCurrentField( DimensionGroupName ) in your expression if you need to check which dimension field, Week or Month is currently active in case you are using a dimension group, then branch into the expression using the correct set analysis.

3 Replies
MVP
MVP

Re: Help - WeekEnd or MonthEnd for daily projections

Maybe something like

=FirstSortedValue({<ReplenishFlag={1}>} Projectie, -DateField)

joris_lansdaal
Contributor

Re: Help - WeekEnd or MonthEnd for daily projections

Thanks, swuehl!

This does work at BQS_ind level. However I need a sum for totals and sub totals in order to project/assess total future inventory.

MVP
MVP

Re: Help - WeekEnd or MonthEnd for daily projections

What about creating a flag in your master calendar (for week end and month end separately), then use this flag in your set expression?

edit:

You can use GetCurrentField( DimensionGroupName ) in your expression if you need to check which dimension field, Week or Month is currently active in case you are using a dimension group, then branch into the expression using the correct set analysis.