Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Set analisys compare vs last year problem

Di Dear Community

I have this problem with this expression :

sum({<Tipo= {'PyG'},Año = {$(=Max(Año)-1)},Mes={"<=$(vMaxMes2)"}>} MVCO_MTOREN)

I'm using the expression in a Pivot Table With thre dimentions (Superior, Group and Subgroup) to try show the value in the last year and accumulate January to month selected.

The expression works fine when in the Year and Month selected there are values (files in the fact table), some cases there are values (files in the fact table), in the last year of year selected and month selected, but there aren't values (files in the fact table), for the selected year and month.

Example

Subgroup Cost value for Aug 2010 --> 1.000

Subgroup Cost value for Aug 2011 --> There aren't values (files in the fact table),

Year listbox value selected 2011,

Month listbox selected Aug,

I Test the expression in a Text Object incluying in set analysis the key for value that aren't values for the selected year and month  and works fine

1 Solution

Accepted Solutions
Not applicable

Set analisys compare vs last year problem

I solved the problem change some parameters in SA

5 Replies
Not applicable

Set analisys compare vs last year problem

Hi,

i don't undrestand very mauch your problem , but ithik if use the  month year in set analysis is more  simple. you concatenate th emonth and the year and in your expression set analysis you compare the fileds monthyear.

Not applicable

Set analisys compare vs last year problem

Dear blgacem.ejmal

The problem is that the expression does not work well when there no rows in the period you selected in the fields Year and Month, but if there in Year-1 and the same month there are values,


An example with not works fine:

  • Value Field Selected for Year: 2011
  • Value Field Selected for Month: August
  • Value August 2011: (No records)
  • Value for August 2010: 1000.
  • Result of expression: The expression NOT show 1000

An example with works fine:

  • Value Field Selected for Year: 2011
  • Value Field Selected for Month: June
  • Value June 2011: 800
  • Value for June 2010: 1300.
  • Result of expression: The expression show 1300



Clearly the problem?

Not applicable

Set analisys compare vs last year problem

yes it's clear now

concatenate the month and year filds and try this formula

sum({<MonthYearFields={$(=Max(MonthYearFields)-1)}>} MVCO_MTOREN)

i tik it' more simple than you used month and year


Not applicable

Set analisys compare vs last year problem

I tried the option and not works fine, i tested the expression with explicit values in the Set Analiys {<MonthYearFields={Aug2010)} and for the same example not work well.

Not applicable

Set analisys compare vs last year problem

I solved the problem change some parameters in SA

Community Browser