Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi everyone,
i have with an expression "Cant Usuarios Acum" in a chart:
the chart is this:
CALENDARIO_DEAL_EXTERNALS.AñoMes | Cant. Usuarios | Cant Usuarios Acum |
Nov-2010 | 408 | 408 |
Dic-2010 | 438 | 846 |
Ene-2011 | 1112 | 1958 |
Feb-2011 | 1121 | 3079 |
Mar-2011 | 1274 | 4353 |
Abr-2011 | 3491 | 7844 |
May-2011 | 4708 | 12552 |
Jun-2011 | 6258 | 18810 |
Jul-2011 | 7932 | 26742 |
Ago-2011 | 11928 | 38670 |
Sep-2011 | 10272 | 48942 |
Oct-2011 | 13339 | 62281 |
Nov-2011 | 13617 | 75898 |
Dic-2011 | 11196 | 87094 |
Ene-2012 | 11309 | 98403 |
Feb-2012 | 6135 | 104538 |
Mar-2012 | 0 | 104538 |
Abr-2012 | 0 | 104538 |
May-2012 | 0 | 104538 |
Jun-2012 | 0 | 104538 |
Jul-2012 | 0 | 104538 |
Ago-2012 | 0 | 104538 |
Sep-2012 | 0 | 104538 |
Oct-2012 | 0 | 104538 |
Nov-2012 | 0 | 104538 |
Dic-2012 | 0 | 104538 |
Ene-2013 | 0 | 104538 |
and this is the expression:
"=aggr( rangesum( above(
Count({<CALENDARIO_DEAL_EXTERNALS.AñoMes=>} DISTINCT DEAL_EXTERNALS.user_id)
,0,rowno()))
, CALENDARIO_DEAL_EXTERNALS.AñoMes)"
I don't know why but its generate a lot of rows with 0 values. With out that expression the chart looks well with out 0 values.
CALENDARIO_DEAL_EXTERNALS.AñoMes | Cant. Usuarios |
Nov-2010 | 408 |
Dic-2010 | 438 |
Ene-2011 | 1112 |
Feb-2011 | 1121 |
Mar-2011 | 1274 |
Abr-2011 | 3491 |
May-2011 | 4708 |
Jun-2011 | 6258 |
Jul-2011 | 7932 |
Ago-2011 | 11928 |
Sep-2011 | 10272 |
Oct-2011 | 13339 |
Nov-2011 | 13617 |
Dic-2011 | 11196 |
Ene-2012 | 11309 |
Feb-2012 | 6135 |
the expresion of Cant. usuarios is:
COUNT(distinct DEAL_EXTERNALS.user_id)
thanks for any advice
gerardo
That's probably because your calendar (Calendario_DEAL_EXTERNALS.Anomes) shows all that additional values, and your expression just tells to sum all preceding months. But an additional condition could help (assuming that you get a count>0 in all passed months:
=
if(count(distinct DEAL_EXTERNALS.user_id),
aggr( rangesum( above(
Count({<CALENDARIO_DEAL_EXTERNALS.AñoMes=>} DISTINCT DEAL_EXTERNALS.user_id)
,0,rowno()))
, CALENDARIO_DEAL_EXTERNALS.AñoMes))
Thank you so much swuehl!
Enviado el: lunes, 20 de febrero de 2012 04:45 p.m.
Para: Pauza, Gerardo
Asunto: - Re: problem with expression
QlikCommunity <http://community.qlik.com/index.jspa>
Re: problem with expression
created by swuehl <http://community.qlik.com/people/swuehl> in New to QlikView - View the full discussion <http://community.qlik.com/message/193478#193478