Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an app that measures registrations made on an online platform.
In my data table, there is
- Reg_Date -- the date of registration
- Code -- Unique code linked to user
- Week number that I extract
I want to create a KPI, that will simply show me what is the growth (+ or -) in total number of registrations from last week to this week.
As shown in the picture below, I want the KPI to show 11% which is the growth from 1.52k in 7th week 2025 to 1.69k in 8th week 2025.
I have added a sample xlsx file for ref of the data (its modified to maintain confidentiality). Would appreciate any help as I am very new to Qlik!
Thanks a lot!
Hi @Abhi_
Sorry for only replying now. Here is the measure
(Count(Distinct {<WeekYearNum = {"<=$(=Max(WeekYearNum))"}>} Code) /
Count(Distinct {<WeekYearNum = {"<=$(=Max(WeekYearNum, 2))"}>} Code)) - 1
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
Hi @Abhi_
I see you dont have a sales or something that you will sum / count in your sample data. I just added a Sales column.
Here is my result
My Code
Load
*,
Year(Reg_Date)&' - '&Weeknumber as WeekYear,
Year(Reg_Date)&Num(Weeknumber, 00) as WeekYearNum,
;
Load * Inline [
Reg_Date,Code,Weeknumber,Sales
45597,12a,44,546
45608,10c,46,325
45616,13a,47,879
45622,13c,48,956
45623,14d,48,747
45635,17d,50,72
45645,15b,51,793
45651,15b,52,669
45653,15b,52,910
45839,12a,27,525
45839,12a,27,655
45841,13a,27,340
45842,13a,27,830
45860,14a,30,403
45861,12a,30,499
45863,10c,30,945
45842,13a,27,787
45839,15b,27,907
45870,16d,31,378
45880,18e,33,195
45882,13c,33,479
45886,13c,34,745
45888,13c,34,405
45890,10c,34,711
45892,13a,34,422
45897,13c,35,667
45899,14d,35,96
];
Measure in the KPI Object
Sum({<WeekYearNum = {"$(=Max(WeekYearNum))"}>} Sales) /
Sum({<WeekYearNum = {"$(=Max(WeekYearNum, 2))"}>} Sales) - 1
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
Hello @JandreKillianRIC,
Big thanks for your reply !! the first solution helps a lot!!
And I just realized I need to explain my problem better. So here goes another try with similar sample set.
The field to be counted is Code.
I want my KPI to show what is the growth in number of unique codes from previous week to current week.
Taking my sample data:
- End of Week 34 has 11 unique IDs
- End of Week 35 has 12 unique IDs
So the growth in Week 35 is 9%.
Hope this is more clarifying!
Hi, @Abhi_
I don't know if I get you right but
the KPI formula:
(Count({<Week = {$(week_now)}>}distinct Code) / Count({<Week = {$(prev_week)}>}distinct Code)) -1
For today's week:
Variable: week_now: =week(today())
Variable: prev_week: =week(today()-7)
remember to leave = in definision of variables
For your custom week number just type :
Variable: week_now: = 2
Variable: prev_week: = 1
for just max week of yor data:
Variable: week_now: = Max(Week)
Variable: prev_week: = Max(Week)-1
Hello @BPiotrowski
Thanks for the reply! but unfortunately it doesnt solve my problem.
Your solution gives the same answer as Jandre. Both are perfect when I am want to know growth in just number of codes from previous week to current week.
What I am looking for how many unique ids got added to the data table from previous week to current week.
Thanks!
Thanks for sharing information
Hi @Abhi_
Sorry for only replying now. Here is the measure
(Count(Distinct {<WeekYearNum = {"<=$(=Max(WeekYearNum))"}>} Code) /
Count(Distinct {<WeekYearNum = {"<=$(=Max(WeekYearNum, 2))"}>} Code)) - 1
Regards Jandre
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
Hi Jandre! This is perfect!! Many thanks 🙂