Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate the price inflation between month to month. for example, I would like to see the price increase/decrease for service A between the month of July and August, and August and September(consecutive months). what is the suitable function to do this?
Hi, you can use Before() to access the previous column, like: RangeSum(Value,-Before(Value))/Before(Value)
This needs at least two months to calculate.
If the service increase/decrease should not be affected by other selections it will better to have it precalculated in script.
Hi, if doesn't shows could be becuase ther is more than one Value, so you need to use an aggregation function like Sum() or AVG(), so:
RangeSum(Sum(Value),-Before(TOTAL Sum(Value)))/Before(TOTAL Sum(Value))
Hi, you can use Before() to access the previous column, like: RangeSum(Value,-Before(Value))/Before(Value)
This needs at least two months to calculate.
If the service increase/decrease should not be affected by other selections it will better to have it precalculated in script.
Hi, what if I need to calculate inflation between Dec 2021 and Jan 2022?
also how can I apply the same logic on the Total?
Thank you in advance
Hi, in that case you'll need to add a 'TOTAL' clause to the Before function:
RangeSum(Value,-Before(TOTAL Value))/Before(TOTAL Value)
Thanks Rubenmarin it's working!
One more query, how can I show the inflation between the totals as shown below?
Hi, if doesn't shows could be becuase ther is more than one Value, so you need to use an aggregation function like Sum() or AVG(), so:
RangeSum(Sum(Value),-Before(TOTAL Sum(Value)))/Before(TOTAL Sum(Value))
Thank you Rubenmarin !
Hi @rubenmarin ,
This looks like this could also help me...🤞..
Essentially, I'm trying to give user's a one word 'Increasing' or 'Declining' month-on-month into a variable based on monthly User Sessions of one of our QlikSense Apps.. So, if we have sessions from Apr 2023 to now, is there a way to inform the user what the 'trend' is?
Can this be accomplished?
Kind regards,
Dai
Hi, yes, using above solution it could be something like:
If(Sum(Value)>Before(TOTAL Sum(Value)), 'Increasing', If(Sum(Value)<Before(TOTAL Sum(Value)),'Decreasing','Equal'))
But if this can be precalculated in script, in a table by user and month htat already has stored if the user increases or decreases will have better perfomance, this can be done if there is nonen or only a few selections that can affect the result of each user-month.
And a last thing, if you have a question different than the one in the thread it will be better to open a new question to avoid to messing the thread. You can add links as reference in your own question.