Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
joaognoatto
Contributor
Contributor

Help with MoM % expression (Month-over-Month growth percentage)

Hello! I would like help with a code about MoM %, percentage of growth compared to the previous month. In this case, my code is this one, but it didn't bring me any result. I believe the problem is in the date code itself. Thank you in advance.

Sum({<ds_estrutura = {"Ativos"}, ds_tipo = {"QUADRO_INDICADOR"},dt_calendario = {"$(=Date(dt_calendario))"}>} vl_indicador)
/
Sum({<ds_estrutura = {"Ativos"}, ds_tipo = {"QUADRO_INDICADOR"},dt_calendario = {"$(=Date(AddMonths(dt_calendario, -1)))"}>} vl_indicador) - 1

joaognoatto_0-1711678907136.png

joaognoatto_1-1711679226305.png

Labels (2)
1 Reply
rubenmarin

Hi, you can try adding a table with each division operator in his own expression, one for the numerator and another for the denominator. And check if only one of them is failing to calculate.

Maybe some month selection is causing the divisor to fail and have to ignore selections so the calculated date is reachable, something like:

Sum({<ds_estrutura = {"Ativos"}, ds_tipo = {"QUADRO_INDICADOR"},dt_calendario = {"$(=Date(AddMonths(dt_calendario, -1)))"},dt_año,dt_mes,dt_trimestre>} vl_indicador) - 1