Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Set Analysis

Hi all

I have a script with one fact table and two dimension tables.

One of the dimension tables is a calendar with each calendar date in it, which includes various groupings like Year, Week, YTD, QTD, LastWeek, LastMonth etc.

On most of the sheets in my report I want the figures to be sliced and diced by the various date selections, however on one sheet I want the data to be sliced by the fields in the other dimension table only.

I am using set analysis, but rather than ask the formula to ignore each calendar field seperately in something like the following

=Sum({$<YTD=, ThisWeek=, ThisMonth=>}FactValue)

Is there a way to use set analysis to ignore all field selections except the ones that I specify?  I know you can use 1 as the identifier, but how then do I ask the expression to honour the selection in a field like 'Depot'

=Sum({1<Depot={[Selection]}, ReportGroup={[Selection]}>}FactValue)

Thanks

James

Tags (1)
5 Replies
mov
Esteemed Contributor III

Re: Set Analysis

James,

Try this:

=Sum({1<Depot=P(Depot), ReportGroup=P(ReportGroup)>}FactValue)

MVP
MVP

Re: Set Analysis

Or try this:

http://community.qlik.com/message/1267#1267

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
thornofcrowns
Valued Contributor II

Re: Set Analysis

What does the P do in P(Depot)?

mov
Esteemed Contributor III

Re: Set Analysis

P stands for possible.

Depot will be using possible values of itself.

thornofcrowns
Valued Contributor II

Re: Set Analysis

Ah, I see. Many Thanks!

Community Browser