Hi,
How can I show the Totals (sum) I get on a table as a KPI?
I’m comparing the Gross Number of Hours (Cambio rel. Horas totales brutas) of a year selected (filtrado) with the previous one (filtrado-1). In the examples shown I have selected 2023.
I have the following expressions:
- Cambio rel. Horas totales netas (filtrado)
- Sum({$<EstadoGrupo={'Cerrado'}, AñoFin={$(=Max(Year(FechaFin)))}>}HorasTotalesGrupo)
- Cambio rel. Finalizados participaciones (filtrado)
- Count({$<EstadoGrupo={'Cerrado'}, Finaliza={'S'}, AñoFin={$(=Max(Year(FechaFin)))}>} AlumnoId)
- Cambio rel. Horas totales brutas (filtrado)
- SUM(AGGR([Cambio rel. Horas totales netas (filtrado)]*[Cambio rel. Finalizados participaciones (filtrado)], GrupoId))
- Cambio rel. Horas totales netas (filtrado-1)
- Sum({$<EstadoGrupo={'Cerrado'}, AñoFin={$(vAñoAnterior)}>} HorasTotalesGrupo)
- Cambio rel. Finalizados participaciones (filtrado-1)
- Count({$<EstadoGrupo={'Cerrado'}, Finaliza={'S'}, AñoFin={$(vAñoAnterior)}>} AlumnoId)
- Cambio rel. Horas totales brutas (filtrado-1) EVERYTHING FINE UNTIL HEREj. Now I show what I get with each expression.
- SUM(AGGR([Cambio rel. Horas totales netas (filtrado-1)]*[Cambio rel. Finalizados participaciones (filtrado-1)], GrupoId))
![aguitatierra_3-1696006539086.png aguitatierra_3-1696006539086.png](https://community.qlik.com/t5/image/serverpage/image-id/117420iA0391EC4CDA2CB62/image-dimensions/776x386?v=v2)
- SUM(Aggr(Sum({$<EstadoGrupo={'Cerrado'}, AñoFin={$(vAñoAnterior)}>}), GrupoId) HorasTotalesGrupo)
![aguitatierra_1-1696006284587.png aguitatierra_1-1696006284587.png](https://community.qlik.com/t5/image/serverpage/image-id/117417i7C71B33F8479B8CC/image-dimensions/784x390?v=v2)
- [Cambio rel. Horas totales netas (filtrado-1)]*[Cambio rel. Finalizados participaciones (filtrado-1)]
With this expression I get the closest to what I want. The table works fine, but in the KPI I can’t manage to get the value that is in Totals.
I also wander it works here…
- Cambio rel. Horas totales brutas (filtrado)
- SUM(AGGR([Cambio rel. Horas totales netas (filtrado)]*[Cambio rel. Finalizados participaciones (filtrado)], GrupoId))
… but not now.
![aguitatierra_4-1696006586002.png aguitatierra_4-1696006586002.png](https://community.qlik.com/t5/image/serverpage/image-id/117421i551597FDC88D1F23/image-dimensions/780x391?v=v2)
I’d very much appreciate any help! I’ve been messing around with this quite a bit...
Many thanks in advance!