Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there, I'm new in qlik sense and i'm trying to build an app that shows a daily index scores. index score formula is (currentScore/PreviousScore)*100. but my problem is i don't know how to get the previous data inside the measure. please help
here's my sample data
Day | Score | Branch |
Sun | 80 | BR01 |
Mon | 95 | BR02 |
Tue | 70 | BR01 |
Wed | 85 | BR02 |
Thu | 95 | BR02 |
Fri | 85 | BR01 |
Sat | 80 | BR01 |
Sun | 75 | BR02 |
Mon | 85 | BR02 |
Tue | 85 | BR01 |
Wed | 70 | BR02 |
Thu | 90 | BR01 |
Fri | 75 | BR02 |
Sat | 95 | BR01 |
In the script you can use the previous() function:
LOAD
Day,
Score,
Score/Previous(Score)*100 as IndexScore
Branch
FROM
...;
In charts you can use the Above function: Num(Score/Above(Score),'0.00%')