Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show accumulated data when filtering by year / Mostrar datos acumulados al filtrar por año

Good afternoon,

I need to implement a functionality in a bar chart and I can not find a way to do it.

The problem is the following:

- I need to paint the accumulated data along a time axis according to a year filter, that is, if I do not select anything, the entire time axis is shown (all the data that I have loaded) with the accumulation year after year of the data . This does it well.

- When I select a specific year in the filter, in the graph you have to represent only the accumulated data for that year.

For example: if I select the year 2017, I have to visualize only the year 2017 on the X axis, but with all the data accumulated up to that date (in this case from 2010 to 2017) and so on with the rest of the years.

To show the accumulated data, I have marked the Full Accumulation check in the Expressions tab and then for the accumulated per year I have this expression:

=Num(COUNT( { <Date_Año_NM={"<=$(=max(date(Date_Año_NM)))"}> } distinct Protagonista_Ficha_CD),'###########.###')

what he does is tell me the protagonists for the minors or the same maximum year selected in the year filter.

With this expression if I filter per year the accumulated data, but it shows me all the previous years and the one selected in the X axis. If I remove it, I only get the protagonists created in that year, but I would need the accumulated ones.

I have been thinking about the expression of set analysis, but I can not find the key.

thank you in advance.

-------------------------------------------------------------------------------------------------------------------------------------------------------



Buenas tardes,

Necesito implementar una funcionalidad en un gráfico de barras y no encuentro la forma de hacerlo.

El problema es el siguiente:

- Necesito pintar los datos acumulados a lo largo de un eje temporal según un filtro de año, esto es, si no selecciono nada, se muestra todo el eje temporal (todos los datos que tengo cargados) con la acumulación año tras año de los datos. Esto lo hace bien.

- Cuando yo seleccione un año concreto en el filtro, en la gráfica se tiene que representar sólo los datos acumulados de ese año.

Por ejemplo: si selecciono el año 2017, tengo que visualizar únicamente el año 2017 en el eje X, pero con todos los datos acumulados hasta esa fecha (en este caso desde 2010 a 2017) y así con el resto de años.

Para mostrar los datos acumulados, tengo marcado el check de Acumulación Completa en la pestaña Expresiones y luego para el acumulado por año tengo esta expresión:

=Num(COUNT( { <Date_Año_NM={"<=$(=max(date(Date_Año_NM)))"}> } distinct Protagonista_Ficha_CD),'###########.###')

que lo que hace es contarme los protagonistas para los menores o igual año máximo seleccionado en el filtro de año.

Con esta expresión si filtro por año me salen los datos acumulados, pero me muestra todos los años anteriores y el seleccionado en el eje X. Si la quito, me salen solo los protagonistas creados en ese año, pero yo necesitaría los acumulados.

He estado dándole vueltas a la expresión de set analysis, pero no consigo dar con la clave.

Si podéis echarme un cable, gracias de antemano.

1 Reply
rgonzalezal
Contributor
Contributor

Hi, did you manage to solve the problem?
I need to do something similar but with months and we can hear it, if you could solve it, can you tell me what the solution was?
Thank you!

______________________________________

Hola, conseguiste resolver el problema?
yo necesito hacer algo similar pero com meses y nos oy capaz de hacerlo, si lo pudiste solucionar, me puedes decir cual fué la solución?
Gracias!