Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a scenario where I have to compare the users count for each month wrt users count in previous month and show as percentage change.
I have attached the snap of number of users per month.
required bar chart should have the change over every month.
example: for the June month bar , the calculation should be (June count -May count)/(May Count)
i.e (191-177)/177 = 0.11.
Request for your support.
Br,
sujay.
Try using Above()/Below() function
If(MonthYear, Sum(Measure)/Above(Sum({<MonthYear>}Measure)) - 1)
Try using Above()/Below() function
If(MonthYear, Sum(Measure)/Above(Sum({<MonthYear>}Measure)) - 1)
Hi Sunny,
Thanks for the solution it worked fine for me.
But what if I have to show the change over 2 dimensions like may be in a Line graph if I want to show change over month and also on app (month on x axis and app as lines in y axis). Then how can i calculate the change.
Thanks in advance.
Something like this
Aggr(
If(MonthYear, Sum(Measure)/Above(Sum({<MonthYear>}Measure)) - 1)
, AppDimensionName, MonthYear)
Hi Sunny,
Thanks for your response, but sorry it isnt working for this scenario.
Hi Sunny,
Would you please explain the logic for this expression? I thought the If statement will need a condition " if (condition, true, false)" . Thank you
Michael
Hi Sunny,
what's the syntax ? You do not equate MonthYear to some values ...
Sum({<MonthYear>}Measure)
Is that equal to {<MonthYear= >} ?
If not, how does it work? Is there any official material about it?