Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month graph problems with Set Analysis

Dear QV Community

I have a  QV model in which the following Set Analisys performed to based on a chosen date in the master schedule built around the field (Date), I find the biggest and equal to this date in the field (Date1) and lower and equal to this date in field.(Date2)  The expression is style

Sum ({<Year=,Semester=,Quarter=,Month=,Day=,Date1={"> = Max (Date) "}, Date2 = {" <= Max (Date) "}>} Sales)

The result works fine if I just take a year and a month, but if I wanted to look at the value in a bar chart which makes use of the month as a dimension, it shows me the desired value, what it does is put the value that corresponds to the year and month (Date) dispersed between the months selected for Date and Date2.

I have no knowledge of how to do this, I appreciate any collaboration

----------------Spanish Version -------------

Tengo un  modelo QV en el cual realizo el siguiente Set Analisys para que basado en una fecha que escogí en el calendario maestro construido en base al campo (Date), me busque las mayores e iguales a esta fecha en el campo (Date1) y menores e iguales a esta fecha en el campo Date2. La expresión es del estilo

Sum({<Year=,Semester=,Quarter=,Month=,Day=,Date1={“>= Max(Date)”},Date2={“<=Max(Date)”} >} Sales)

El resultado funciona correctamente si solo tomo un año y mes, pero si quisiera mirar el valor en un grafica de barras donde haga uso del mes como dimensión, no me muestra el valor deseado, lo que hace es poner el valor que corresponde al año y mes (Date) seleccionado disperso entre los meses de Date y Date2.

No tengo conocimiento de cómo realizarlo, agradezco cualquier colaboración

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The set is calculated once per chart, not per row. That's why you see the values spread over the months. Maybe you can use some sort of AsOf table. See Calculating rolling n-period totals, averages or other aggregations. Or you could try creating an expression with a separate set analysis sub-expression for each month. See Evaluating "sets" in the context of a dimension


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

The set is calculated once per chart, not per row. That's why you see the values spread over the months. Maybe you can use some sort of AsOf table. See Calculating rolling n-period totals, averages or other aggregations. Or you could try creating an expression with a separate set analysis sub-expression for each month. See Evaluating "sets" in the context of a dimension


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

Thanks for ur answer, i made one expression per month, and i can solve the problem.

Thanks for ur help