Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

etrotter
Contributor II

Set analysis or Calculation Condition

Hi, I am trying to create a table with the following dimensions:

Week: Current Week and the same week last year

Month: Current Month and the same month last year

Current Year and Prior Year

Should I use set analysis in each of the measures, or a calculation condition and how would I go about writing it?

My time variable is

[Week of Hours Worked]

[Month of Hours Worked]

[Year of Hours Worked]

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Set analysis or Calculation Condition

To me, it looks like you would rather use several expressions with set analysis to limit the different time ranges instead.

There are several threads that are coping with this type of reporting, e.g.

http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/

Calendar with flags making set analysis so very simple

2 Replies
MVP
MVP

Re: Set analysis or Calculation Condition

To me, it looks like you would rather use several expressions with set analysis to limit the different time ranges instead.

There are several threads that are coping with this type of reporting, e.g.

http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/

Calendar with flags making set analysis so very simple

YoussefBelloum
Esteemed Contributor

Re: Set analysis or Calculation Condition

Hi,

Both of them can get you to the results you need.

in the data you listed, there is the column Year missing, so in the load script you can add it.

to have the current year using the a calculated dimension, you can try this:

if(Year = Year(today()), Year)

For the set analysis, you can try this:

Aggregation-function( {< Year={ $(=Year(Today())) } >}  [Column])

Hope it helps !

YB

Community Browser