Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Vol.%%03,%No.%08,%August%2023%
e-ISSN:%2807-8691,|,p-ISSN:%2807-839X$
!
IJSSR!Page%3354
https://doi.org/10.46799/ijssr.v3i12.652%
This%work%is%licensed%under%a%Attribution-ShareAlike%4.0%International%(CC%BY-SA%4.0)
K-Means(Algorithm(Method(for(Clustering(Best-Selling(
Product(Data(at(XYZ(Grocery(Stores(
!
Mohamad!Maulana!Ridzki
1
,!Ijah!Hadijah
2
,!Mukidin
3
,!Adelia!Azzahra
4
,!Aisyah!Nurjanah
5&
Sekolah%Tinggi%Ilmu%Komputer%(STIKOM)%PolTek%Cirebon,%Indonesia
1,2,3
%
Public%Administration,%Universitas%Swadaya%Gunung%Jati%Cirebon,%Indonesia
4&
English%Language%Education,%UIN%Sunan%Gunung%Djati%Bandung,%Indonesia
5&
1
4
5&
Keywords)
!
ABSTRACT!
!"#$%&'()*+,-./012)#$01-3()
4+5'0$./&,)6%+$'()7.-3580)9%0%()
:.-8$.;)60-.$'<)
!
This%study%aims%to%utilize%the%K-means%clustering%algorithm%in%data%
mining%to%categorize%sales%data%at%XYZ%Grocery%store.%The%research%is%
essential%for%understanding%sales%patterns%and%enhancing%inventory%
management% strategies.% The% research% methodology% involves%
implementing%the%K-means%clustering%algorithm% to%generate% centroid%
values%for%each%cluster,%thereby%creating%groups%of% prod ucts%based%on%
their%sales%performance.%The%findings%of%this%study%are%expected%to%
provide% insights% into% sales% trends% at% the% store.% While% the% abstract%
provides% a% general% overview,% specific% results% and% contributions% of%
this%research%are%not%detailed.%Further%studies%could%offer%a%more%in-
depth%understanding%of%the%practical%applications%of%these%findings%in%
improving%store%man ag e ment%and%inventory%contr o l.!
!
!
!
INTRODUCTION!
In% the% contemporary% retail% landscape,% where% grocery% stores% play% a% pivotal% role% as% essential%
providers%of%daily%necessities,%the%escalating%volume%of%sales%data%necessitates%sophisticated%methods%
for%effective%organization%and%analysis%(Griffin%et%al.,%2023;%Khedmati%&%Azin,%2020;%Pelekis%et%al.,%2023;%
Vásquez% Sáenz% et% al.,% 2023).% This% study% focuses% on% the% application% of% the% K-Means% Algorithm% for%
clustering%best-selling%product%data,%offering%a%promising%solution%to%systematically%categorize%products%
in%grocery%stores%(Ikotun%et%al.,%2023;%Kashe f%&%Pun,%2022;%Luu%et%al.,%2023).%With%consumer%preferences%
evolving% and% a% vast% array% of% products% available,% leveraging% the% K-Means% Algorithm% presents% an%
opportunity%for%grocery%stores%to%gain%valuable%insights%into%consumer%behavior,%optimize%inventory%
management,%and%tailor%marketing%strategies%(Kuo%et%al.,%2022;%Meng%et%al.,%2023;%van%der%Borgh%et%al.,%
2023).%The%research%aims%to%contribute%to%the%enhancement%of%data-driven%decision-making%processes%
within%the%grocery%retail%sector,%providing%practical%guidance%for%store%managers%and%stakeholders%in%
adapting%to%changing%market%dynamics%and%improving%overall%operational%efficiency.%
This% research% lies% in% the% challenges% faced% by% convenience% stores% as% providers% of% daily% and%
wholesale%necessities.%They%encounter%difficulties%in%manually%recording%sales%transactions%using%ledger%
books.% Their% inventory% management% system% adopts% a% sales-based% approach% to% optimize% warehouse%
capacity%and%reduce%the%risk%of%product%damage%(Mudzakkir,%2018;%Zhou%&%Sun,%2023).%However,%the%
continued%use%of%manual%record ing%complicates%the%identification%of%fast-selling,%moderately%selling,%and%
slow-selling%items%(Khedmati%&%Azin,%2020;%Meng%et%al.,%2023).%Therefore,%this%research%describes%the%
need%to% implement%a%system% capable%of%categorizing%item% data%based%on%sales%levels,% highly%popular%
categories,%moderately%popular%categories,%and%less%popular%categories%.%
The%urgency%of%this%research%arises%from%the%difficulties%experienced%by%XYZ%convenience%store%
in%categorizing%items%based%on%sales%levels.%Thus%far,%the%methods%tested%in%previous%research%have%not%
been%fully%adequate%to%address%this%issue%in%the%context%of%wholesale%stock%management.%Consequently,%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3355
this%research%proposes%the%use%of%the%k-means%algorithm%as%a%new%approach,%expected%to%provide%a%more%
effective%solution%to%this%problem.%
The%novelty%of%this%research%lies%in%the%application%of%the%k-means%method%to%categorize%sales%
data%within%the%context%of%wholesale%stock% m anagement%in%convenience%stores.%This%is%an%innovative%step%
as% there% has% been% no% prior% research% specifically% utilizing% the% k-means% algorithm% to% address% item%
categorization%issues%in%wholesale%stock%management.%
With%the%goal%of%developing%a%system%using%the%k-means%algorithm,%this%research%aims%to%facilitate%
the%identification%of%highly%popular,%moderately%popular,%and%less%popular%items.%The%benefits%of%this%
research%involve% enhancing%the%efficiency%and% effectiveness%of%wholesale%stock% management%for%XYZ%
convenience%store.%The%implications%lie%in%the%contribution%of%this%research%to%decision-making%regarding%
more%optimal%procurement%strategies,%expected%to%provide%valuable%information%for%store%management%
in%better%managing%inventory.%
!
METHODS!
K-Means!Clustering!Method!
The% K-Means% Clustering% Method% is% a% widely% used% statistical% technique% for% non-hierarchical%
clustering,% employing% the% K-Means% Clustering% Algorithm% as% a% prominent% algorithm% in% this% category%
(Baihaqi%et%al.,%2019;%Fauzi,%2017;%Jabat%&%Murdani,%2019).%The%method%consists%of%several%key%steps:%
Initially,%the%items%are%divided%into%K%initial%clusters,%where%K%denotes%the%predetermined%cluster%
count.%It%is%crucial%to%note%that%the%initial%centers%of%the%clusters%are%obtained%randomly,%introducing%a%
stochastic%element%to%the%process.%
Following%this,%a%calculation%process%is%initiated%on%the%list%of%items.%Each%item%is%assigned%to%a%
specific%group%based%on%its%proximity%to%the%nearest%center,%determined%using%the%Euclidean%Distance.%
However,%it%is%important%to%acknowledge%K-Means'%sensitivity%to%the%initial%conditions.%To%mitigate%this,%
running%the%algorithm%multiple%times% w ith%different%initializations%is% advisable%and%choosing%the%solution%
with%the%lowest%sum%of%squared%distances%is%advisable%(Hadi%&%Diana,%2020;%Nasution%&%Eka,%2018;%Purba%
et%al.,%2018).%
Subsequently,% the% algorithm% recalculates% the% centroid% centers% for% the%newly% formed% clusters,%
accounting%for%any%items%that%may%have%bee n%initially%missing%from%the%clustering%process.%This%iterative%
process%persists%until%no%more%items%are% left%to%designate%as%new%clusters.%The%primary%objective%of%the%
algorithm%is%to%optimize%the%grouping%of%items%into%clusters,%refining%the%centroids%with%each%iteration%
(Niu%et%al.,%2021;%Sinan%et%al.,%2023;%Wang%et%al.,%2023).%
In%summary,%the%K-Means%Clustering%Algorithm%employs%an%iterative%approach%to%partition%items%
into%clusters,%refining%centroid%centers%by%calculating%Euclidean%distances%until%convergence%(Windarto,%
2017).%The%random%initialization%of%cluster%centers%introduces%a%stochastic%element,%contributing%to%this%
method's%versatility%and%widespread%application%in%clustering%analysis%(Chen%et%al.,%2021;%Miao%et%al.,%
2023).%Additionally,%it%is%important%to%address%the%sensitivity%to%initial%conditions%and%consider%running%
the%algorithm%multiple%times%for%robust%results.%
Table!file!design!
!
Table!1.!Test!Plan!
Test!Class!
Test!Grains!
Types!of!Testing!
Login%
Password%Verification%
=+%8>)?-@)
Add%Product%Data%
Add%Product%Data%
=+%8>)?-@)
Transaction%Data%
Add%Transaction%Data%
=+%8>)?-@)
Sales%Data%Report%
Print%Sales%Data%
=+%8>)?-@)
Sales%Cluster%
Sales%Cluster%Results%
=+%8>)?-@)
%
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3356
Table!2.!Product!Data!
Input%Data%
What%to%expect%
Observation%
Conclusion%
Product%Data%
Data%is%saved%to%the%
database%and%can%be%
managed%again%
Product%data%is%inputted%
completely%and%is%in%
accordance%with%the%
provisions%
Accepted%
Press%the%save%
button%
The%save%button%is%
available%and%the%save%
data%function%can%be%used%
Information%appears%that%
the%data%was%successfully%
saved%
Accepted%
%
Test!Design!
Following%the%completion%of%system%development,%the%subsequent% phase% involves% testing% the%
developed%system%using%the%black%box%method,%specifically%focusing%on%the%Error%Guessy%method%in%this%
research.%Black%box%testing%centers%on%evaluating%the%functionality%embedded%within%the%system.%The%
testing%process%encompasses%critical%aspects,%including%assessing%the%system%interface's%functionality.%
This% involves% evaluating% the% interface's% ability% to% execute% its% functions% seamlessly.% Additionally,% the%
research%delves%into%scrutinizing%the%system's%capability%to%effectively%run%its%interface,%ensuring%that%it%
operates%as%intended.%Another%essential%dimension% of%black%box%testing%involves%evaluating%the%system's%
proficiency%in%handling%inputs%beyond%its%predefined%boundaries.%This%includes%assessing%the%system's%
adaptability%to%inputs%that%may%fall%outside%the%expected%parameters.%Lastly,%the%testing%process%extends%
to%the%system's%ability%to%handle%security%issues,%encompassing%its%resilience%to%potential%threats%and%its%
effectiveness%in% safeguarding%sensitive%data.%Through%the%systematic% application% of%the%Error%Guessy%
method%in%testing%these%dimensions,%the%research%aims%to%validate%the%robustness%and%reliability%of%the%
developed% system.% This% comprehensive% evaluation% provides% valuable% insights% into% the% system's%
performance,%identifying%potential%areas%for%improvement%or%refinement.%
%
RESULTS!
Cluster!Center!Distance!Calculation!Results!
To%measure%the%distance%between%the%data%and%the%center%of%the%cluster,%Euclidian%distance%is%
used,%then%the%distance%matrix%will%be%obtained%as%follows:%
d%|=%x%–%y%=%|%∑i%n1%=%(xi%–%yi)
2
%x%=%cluster%center%
y%=%data%
In%this%case,%the%initial%center%of%the%cluster%has%been%chosen:%C1%is%very%marketable%(80,%100),%C2%
sells%well%(40,%100)%and%C3%is%undersold%(10,%100).%Then%the%distance%calculation%is%carried%out%from%the%
rest%of%the%data%sample%with%the%cluster%center,%for%example%with%M(a,%b)%where%a%is%the%stock%of%goods%
and%b%is%the%number%of%transactions%sold.%
%
D1%=%(150,%22)%
D2%=%(100,%42)%
D3%=%(90,%21)%
D4%=%(50,%20)%
D5%=%(120,%87)%
%
Calculate%the%Euclidean%Distance%of%all%data%to%the%center%of%the%first%cluster.%
%
D1(p,c)%=%(22-80)²+(150-100)²%=%76.58%
D1(p,c)%=%(22-40)²+(150-100)²%=%53.14%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3357
D1(p,c)%=%(22-10)²+(150-100)²%=%51.42%
%
D2(p,c)%=%(100-80)²+(42-100)²%=%38.00%
D2(p,c)%=%(100-40)²+(42-100)²%=%2.00%
D2(p,c)%=%(100-10)²+(42-100)²%=%32.00%
%
D3(p,c)%=%(90-80)²+(21-100)²%=%45.12%
D3(p,c)%=%(90-40)²+(21-100)²%=%10.77%
D3(p,c)%=%(90-10)²+(21-100)²%=%27.86%
%
D4(p,c)%=%(22-80)²+(150-100)²%=%78.10%
D4(p,c)%=%(22-40)²+(150-100)²%=%53.85%
D4(p,c)%=%(22-10)²+(150-100)²%=%50.99%
%
D5(p,c)%=%(120-80)²+(87-100)²%=%22.36%
D5(p,c)%=%(120-40)²+(87-100)²%=%53.85%
D5(p,c)%=%(120-10)²+(87-100)²%=%82.46%
%
From%the%calculation%of%Eucludien%Distance%to%the%first%center%point%is%obtained%as%follows:%
%
Table!3.!0th!iteration!
Data%
C1%Sells%
Highly%
C2%Laku%
C3%
Undersells%
Closest%
Distance%
D1%
76,58%
53,14%
51,42%
3%
D2%
38,00%
2,00%
32,00%
2%
D3%
45,12%
10,77%
27,86%
2%
D4%
78,10%
53,85%
50,99%
3%
D5%
22,36%
53,85%
82,46%
1%
%
It%can%be%concluded%from%the%table%above%is%C1%=%1%data,%C2%=%2%data%and%C3%=%2%data.%To%calculate%
the%1st%iteration,%a%new%cluster%will%be%created%in%the%following%way:%
The%determination%of%the%new%cluster%will%be%calculated%by%the%formula:%Number%of%Results%/%Value%
of%Results.%
%
C1%=%(90+66+89)/3%=%(81.67)%
C1%=%(120+70+50)3%=%(80.00)%
C2%=%(42+36+56+29+33+39+%
61+45)/8%=%(43.50)%
C2%=%(100+90+41+80+50+50+%
50+79)/8%=%(67.50)%
C3%=%(22+21+20+15+7+14+11+6+15+15+15+18+%
14+13+19+17+6+13+20+9+26+7)/21%=%(15.05)%
C3%=%(150+50+70+80+66+55+67+40+45+49+%
55+77+90+130+140+125+134+%
122+100+50+80)/21%=%(84.52)%
%
In%the%same%way%calculate%the%distance%of%each%point%to%the%1st%center%point:%
%
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3358
D1(p,c)%=%(150-81)²+(22-80)²%=%91.98%
D1(p,c)%=%(150-43)²+(22-67)²%=%85.26%
D1(p,c)%=%(150-15)²+(22-84)²%=%65.84%
%
D2(p,c)%=%(100-81)²+(42-80)²%=%44.42%
D2(p,c)%=%(100-43)²+(42-67)²%=%32.53%
D2(p,c)%=%(100-15)²+(42-84)²%=%31.08%
%
D3(p,c)%=%(90-81)²+(21-80)²%=%61.49%
D3(p,c)%=%(90-43)²+(21-67)²%=%31.82%
D3(p,c)%=%(90-15)²+(21-84)²%=%8.09%
%
D4(p,c)%=%(22-81)²+(150-80)²%=%68.58%
D4(p,c)%=%(22-43)²+(150-67)²%=%29.30%
D4(p,c)%=%(22-15)²+(150-84)²%=%34.88%
%
D5(p,c)%=%(120-81)²+(87-80)²%=%40.86%
D5(p,c)%=%(120-43)²+(87-67)²%=%70.13%
D5(p,c)%=%(120-15)²+(87-84)²%=%82.92%
%
Table!4.!1st!iteration.!
Data%
C1%Sells%
Highly%
C2%Laku%
C3%
Undersells%
Closest%
Distance%
D1%
91,98%
85,26%
65,84%
3%
D2%
44,42%
32,53%
31,08%
3%
D3%
61,49%
31,82%
8,09%
3%
D4%
68,58%
29,30%
34,88%
2%
D5%
40,86%
70,13%
82,92%
1%
%
It%can%be%concluded%from%the%table%above%is%C1%=%1%data,%C 2%=%1%data%and%C3%=%3%data.%T o %calculate%
the%2nd%iteration,%a%new%cluster%will%be%created%in%the%following%way:%
The%determination%of%the%new%cluster%will%be%calculated%by%the%same%formula:%Number%of%Results/Value%
of%Results.%
%
C1%=%(90+89)/2%=%(89.5)%
C1%=%(120+50)/2%=%(85)%
C2%=%(20+66+15+36+15+36+15+18+56+%
26+33+39+61+45)/12%=%(35.83)%
C2%=%(50+44+40+41+45+49+80+50+%
50+50+50+79)/12%=%(52.33)%
C3%=%(22+42+21+15+7+14+11+6+14+13+%
19+17+29+6+13+6+20+9+7)/18%=%(15.38)%
C3%=%(150+100+90+70+80+66+55+67+55+77+%
90+130+140+125+134+122+80)/18%=%(96.16)%
%
In%the%same%way%calculate%the%distance%of%each%point%to%the%center%of%the%2nd%cluster:%
%
D1(p,c)%=%(150-89)²+(22-85)²%=%93.71%
D1(p,c)%=%(150-35)²+(22-52)²%=%98.64%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3359
D1(p,c)%=%(150-15)²+(22-96)²%=%54.19%
%
D2(p,c)%=%(100-89)²+(42-85)²%=%49.81%
D2(p,c)%=%(100-35)²+(42-52)²%=%48.04%
D2(p,c)%=%(100-15)²+(42-96)²%=%26.45%
%
D3(p,c)%=%(90-89)²+(21-85)²%=%68.68%
D3(p,c)%=%(90-35)²+(21-52)²%=%40.48%
D3(p,c)%=%(90-15)²+(21-96)²%=%8.05%
%
D4(p,c)%=%(22-89)²+(150-85)²%=%77.82%
D4(p,c)%=%(22-35)²+(150-52)²%=%16.00%
D4(p,c)%=%(22-15)²+(150-96)²%=%46.35%
%
D5(p,c)%=%(120-89)²+(87-85)²%=%35.00%
D5(p,c)%=%(120-35)²+(87-52)²%=%86.68%
D5(p,c)%=%(120-15)²+(87-96)²%=%77.90%
%
Table!5.!2nd!iteration!
Data%
C1%Sells%
Highly%
C2%Laku%
C3%
Undersells%
Closest%
Distance%
D1%
93,71%
98,64%
54,19%
3%
D2%
49,81%
48,04%
26,45%
3%
D3%
68,68%
40,48%
8,05%
3%
D4%
77,82%
16,00%
46,35%
2%
D5%
35,00%
86,68%
77,90%
1%
%
It%can%be%concluded%from%the%table%above%is%C1%=%1%data,%C2%=%1%data%and%C3%=%3%data.%To%calculate%
the%2nd%iteration,%a%new%cluster%will%be%created%in%the%following%way:%%
The%determination%of%the%new%cluster%will%be%calculated%by%the%formula:%Number%of%Results%/%Value%of%
Results.%
%
C1%=%(90+56+89)/3%=%(78.33)%
C1%=%(120+50+80)/3%=%(83.33)%
C2%=%(20+14+11+66+15+36+15+18+%
14+26+33+39+61+45)/8%=%(29.5)%
C2%=%(50+66+55+44+40+41+45+49+55+%
50+50+50+50+79)/8%=%(51.71)%
C3%=%(22+42+21+15+7+6+13+%
19+17+6+13+20+9+7)/14%=%(16.4)%
C3%=%(150+100+90+70+80+67+77+90+130+%
140+125+134+122+100+80)/14%=%(103.67)%
%
In%the%same%way%count%each%center%point%to%the%3rd%point:%
%
D1(p,c)%=%(150-78)²+(22-83)²%=%87.28%
D1(p,c)%=%(150-29)²+(22-51)²%=%98.57%
D1(p,c)%=%(150-16)²+(22-103)²%=%46.47%
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3360
%
D2(p,c)%=%(100-78)²+(42-83)²%=%39.97%
D2(p,c)%=%(100-29)²+(42-51)²%=%49.88%
D2(p,c)%=%(100-16)²+(42-103)²%=%25.86%
%
D3(p,c)%=%(90-78)²+(21-83)²%=%57.72%
D3(p,c)%=%(90-29)²+(21-51)²%=%39.22%
D3(p,c)%=%(90-16)²+(21-103)²%=%14.22%
%
D4(p,c)%=%(22-78)²+(150-83)²%=%61.19%
D4(p,c)%=%(22-29)²+(150-51)²%=%9.65%
D4(p,c)%=%(22-16)²+(150-103)²%=%53.79%
%
D5(p,c)%=%(120-78)²+(87-83)²%=%38.48%
D5(p,c)%=%(120-29)²+(87-51)²%=%91.23%
D5(p,c)%=%(120-16)²+(87-103)²%=%75.39%
%
Table!6.!Iteration-3!
Data%
C1%Sells%
Highly%
C2%Laku%
C3%
Undersells%
Closest%
Distance%
D1%
93,71%
98,64%
54,19%
3%
D2%
49,81%
48,04%
26,45%
3%
D3%
68,68%
40,48%
8,05%
3%
D4%
77,82%
16,00%
46,35%
2%
D5%
35,00%
86,68%
77,90%
1%
%
It%can%be%concluded%from%the%table%above%is%C1%=%1%data,%C2%=%1%data%and%C3%=%3%data.%To%calculate%
the%2nd%iteration,%a%new%cluster%will%be%created%in%the%following%way:%%
The%determination%of%the%new%cluster%will%be%calculated%by%the%formula:%Number%of%Results%/%Value%of%
Results.%
%
C1%=%(90+56+89)/3%=%(78.33)%
C1%=%(120+80+50)/3%=%(83.33)%
C2%=%(20+15+14+66+11+66+6+15+36+%
15+18+14+26+33+39+61+45)/16%=%(29.5)%
C2%=%(50+70+66+55+44+67+41+45+49+55+%
50+50+50+50+79)/16%=%(53.81)%
C3%=%(22+42+21+7+13+19+17+29+6+%
13+20+9+7)/14%=%(17.30)%
C3%=%(150+100+90+80+77+90+130+1%
40+125+134+122+100+80)/14%=%(109.07)%
%
In%the%same%way%calculate%each%point%to%the%center%of%the%point%kr-4:%
%
D1(p,c)%=%(150-78)²+(22-83)²%=%87.28%
D1(p,c)%=%(150-29)²+(22-53)²%=%96.32%
D1(p,c)%=%(150-17)²+(22-109)²%=%41.19%
%
D2(p,c)%=%(100-78)²+(42-83)²%=%39.97%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3361
D2(p,c)%=%(100-29)²+(42-53)²%=%48.52%
D2(p,c)%=%(100-17)²+(42-109)²%=%26.31%
%
D3(p,c)%=%(90-78)²+(21-83)²%=%57.72%
D3(p,c)%=%(90-29)²+(21-53)²%=%36.70%
D3(p,c)%=%(90-17)²+(21-109)²%=%19.43%
%
D4(p,c)%=%(22-78)²+(150-83)²%=%67.19%
D4(p,c)%=%(22-29)²+(150-53)²%=%8.08%
D4(p,c)%=%(22-17)²+(150-109)²%=%59.14%
%
D5(p,c)%=%(120-78)²+(87-83)²%=%38.48%
D5(p,c)%=%(120-29)²+(87-53)²%=%91.29%
D5(p,c)%=%(120-17)²+(87-109)²%=%73.51%
%
Table!7.!Iteration-4!
Data%
C1%Sells%
Highly%
C2%Laku%
C3%
Undersells%
Closest%
Distance%
D1%
87,28%
96,32%
41,19%
3%
D2%
39,97%
48,52%
26,31%
3%
D3%
57,72%
36,70%
19,43%
3%
D4%
67,19%
8,08%
59,14%
2%
D5%
38,48%
91,29%
73,51%
1%
%
It%can%be%concluded%from%the%table%above%is%C1%=%1%data,%C2%=%1%data%and%C3%=%3%data.%From%the%
results%of%iteration-0%and%the%last%iteration-4%obtained%the%same%result,%the%iteration%is%declared%over.%
System!Design!Results!
Store%owners%must%log%in%first%before%logging%in%to%the%application%system.!
%
Figure!1.!Login!Page!
After%the%user%successfully%enters,%it%will%be%redirected%to%the%main%page%or%dashboard% of%the%
website.%The%display%can%be%seen%in%the%picture%as%follows.%
%
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3362
%
Figure!2.!Dashboard!Page!
!
The%page%is%about%the%price%of%the%product,%the%product%data,%the%number%of%products%and%the%
date%of%the%product.%The%product%data%view%can%be%seen%as%follows.%
%
%
Figure!3.!Product!Data!Page!
%
To%be%able%to%see%the%details%of%the%report,%you%must%enter%the%sales%report%page.%The%sales%report%
table%contains%data%on%the%name%of%the%product%of%the%item,%the%data%on%the%number%of%items%that%have%
been%sold,%it%looks%as%follows.%
%
%
%
Figure!4.!!Sales!Report!page.!
!
For%sales%cluster%results,%the%store%owner%must%enter%on%the%sales%cluster%menu.%The%sales%cluster%
contains%the%best-selling,%best-selling%and%less-selling%products%in%the%following%appearance.%
%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3363
%
Figure!5.!Sales!clustering!figures.!
%
System!Testing!
Table!8.!Login!Testing.!
Test!Cases!and!Results!(Normal!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
Username:%admin%
Password:%admin%
Admin%is%listed%in%the%
username%field,%
password%is%listed%in%
the%password%field%
Admin%is%listed%in%the%
username%field,%
password%is%listed%in%
the%password%field%
Accepted%
Press%the%Login%button%
User%data%is%searched%
in%the%user%table,%if%
available,%go%to%the%
home%page%
The%login%button%may%
work%properly%
Accepted%
Test!Cases!and!Results!(Incorrect!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
Username:%admin%
Password:%admin%
Admin%is%listed%in%the%
email%field,%testing%is%
listed%in%the%password%
field%
Admin%is%listed%in%the%
mail%field,%******%is%
listed%in%the%password%
field%
Accepted%
Press%the%Login%button%
User%data%not%found%in%
user%table,%failed%login%
and%displays%error%
Login%failed%and%
displays%error%
information%
Accepted%
%
From% the% results% of% functionality% tests% conducted% on% the% system,% several% conclusions% can% be%
drawn%regarding%two%different%use%cases.%First,%the%system%behaves%as%expected%in%use%cases%with%normal%
data,%where%usernames%and%passwords%are%as%expected.%The%login%process%was%successful,%with%admin%
listed%in%the%username%field%and%password%listed%in%the%password%field.%The%login%button%works%well,%
allowing%users%to%enter%the%home%page%without%problems.%Second,%the%system%responds%well%to%input%
errors%in%use%cases%with%incorrect%data.%Despite%a%typo%error%in%the%field,%the%system%can%recognize%and%
respond%appropriately.%In%this%case,%even%though%the%admin%is%listed%in%the%email%field%and%testing%in%the%
password%field,%the%system%still%provides%clear%error%information%to%the%user.%In%addition,%when%user%data%
is%not%found%in%the%database,%the%system%successfully%resolves%the%situation%by%displaying%the%appropriate%
error%message.%Overall,%the%results%of%this%test%show%that%the%system%has%been%successfully%implemented,%
can%manage%inputs%effectively,%and%provides%appropriate%responses%in%normal%situations%and%errors.%
%
Table!9.!Product!Data!Testing!
Test!Cases!and!Results!(Normal!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3364
Product%Data%
Data%is%saved%to%the%
database%and%can%be%
managed%again%
Product%data%is%
inputted%completely%
and%is%in%accordance%
with%the%provisions%
Accepted%
Press%the%save%button%
The%save%button%is%
available%and%the%save%
data%function%can%be%
used%
Information%appears%
that%the%data%was%
successfully%saved%
Accepted%
Test!Cases!and!Results!(Incorrect!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
Product%data%
Data%is%saved%to%the%
database%and%can%be%
managed%again%
Admin%is%listed%in%the%
mail%field,%******%is%
listed%in%the%password%
field%
Accepted%
Press%the%save%button%
The%save%button%is%
available%and%the%save%
data%function%can%be%
used%
Login%failed%and%
displays%error%
information%
Accepted%
%
From%the%results%of% the%product%data%management%system% functionality%test,% positive%conclusions%
can%be%drawn%regarding%two%test%scenarios,%namely%cases%with%normal%data%and%cases%with%incorrect%
data.%In%tests%with%normal%data,%product%data%input%runs%smoothly,%and%the%data%entered%is%in%accordance%
with%applicable%regulations.%The%process%of%using%the%save%button%is%also%successful,%with%the%system%
providing% information% that% the% data% has% been% successfully% saved% into% the% database.% This% positive%
response%indicates%that%the%system%can%manage%the%data%well,%provide%the%expected%results,%and%allow%
data%management%again.%
On%the%other%hand,%in%tests%with%incorrect%data,%the%system%also%showed%satisfactory%performance.%
Even%if%there%is%an%error%in%the%use%of%the%field,%the%system%can%still%recognize%and%respond%to%the%situation%
properly.%The%use%of%inappropriate%fields,%such% as%admin%in%the%email%field%and%certain%characters%in%the%
password%field,%does%not%stop%the%process%of%storing%product%data%in%the%database.%The%save%button%still%
works,% and% even% if% an% error% occurs% in% the% login,% the% system% provides% clear% error% information% after%
pressing%the%save%button.%
In%general,%the%test%results%show%that%the%product%data%management%system%has%been%successfully%
designed% and%implemented%well.%Its%ability%to%m anage%normal%data%input%and%respond%to%error%situations%
provides%confidence%that%the%system%is%reliable%for%effective%and%efficient%management%of%product%data.%
This%conclusion%supports%the%success%of%the%system%in%meeting%user%expectations%and%needs%in%terms%of%
product%data%management%and%storage.%
%
Table!10.!Transaction!Data!Testing!
Test!Cases!and!Results!(Normal!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
Product%Data%
Data%is%saved%to%the%
database%and%can%be%
managed%again%
Product%transaction%
data%is%inputted%
completely%and%in%
accordance%with%the%
provisions%
Accepted%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3365
Pressing%the%
transaction%button%
The%process%button%is%
available%and%the%
transaction%data%
process%function%can%be%
used%
Information%appears%
that%the%transaction%
data%is%in%process%
Accepted%
Test!Cases!and!Results!(Incorrect!Data)!
Input!Data!
What!to!expect!
Observation!
Conclusion!
Product%data%
Data%can%be%processed%
and%according%to%the%
provisions%
Data%is%not%available%
and%does%not%comply%
with%the%conditions%
Accepted%
Press%the%process%
button%
The%process%button%is%
available%and%the%save%
data%function%can%be%
used%
Information%appears%
that%the%data%is%
incomplete%and%not%in%
accordance%with%the%
provisions%
Accepted%
!
From% the%results%of%system%functionality%tests%on%use%cases%with%normal%data,%it%can%be%concluded%
that%the%system%can%manage%product%and%transaction%data%well.%The%entered%product%data%is%successfully%
saved%into%the%database%and%can%be%re-managed%as%needed.%Next,%the%transaction%button%works%fine,%and%
after% pressing% it,% information% appears% stating% that% the% transaction% data% is% being% processed.% This% test%
concludes%that%the%system%can%manage%product%transactions%effectively,%provide%appropriate%responses,%
and%ensure%that%data%is%inputted%completely%and%according%to%the%provisions.%
The%system%also%responds%well%to%error%situations%in%use%cases%with%incorrect%data.%The%process%
button%is%still%available%and%working%even%if%product%data%is%unavailable%and%does%not%comply%with%the%
conditions.%After%pressing%the%process%button,%information%appears%stating%that%the%data%is%incomplete%
and%not%in%accordance%with%the%provisions.%The%conclusion%that%can%be%drawn%is%that%the%system%can%
recognize%data%discrepancies%and%provide%clear%information%to%users.%Even%if%there%is%an%error,%the%system%
can% still% continue% the% process% and% guide% users% to% complete% the% data% in% accordance% with% applicable%
regulations.%
The% test% results% show% that% the% system% performs% satisfactorily% in% managing% product% and%
transaction%data.%Its%ability%to%handle%normal%and%incorrect%data%reflects%a%solid%design%and%functionality%
that% matches% user% expectations.% This% conclusion% indicates% that% the% system% can% reliably% support% the%
product%transaction%process%efficiently,%provide%a%good%user%experience,%and%ensure%compliance%with%
applicable%Top.%
!
CONCLUSION!
%In%this%study,%after%going%through%the%system%design%and%implementation%stages,%the%k-means%
algorithm%successfully%reached%the%4th%iteration,%forming%three%clusters%with%details%of%the%amount%of%
data%in%each%cluster.%The%test%run%shows%data% consistency%at%the%initial%and%final%iterations,%certifying%that%
the% data% clustering% process% has% been% completed.% After% implementation,% this% application% proved%
successful%in%helping%XYZ%Wholesale%stores%identify%very%salable,%salable,%and%undersold%products.%The%
information%generated%by%the%application%provides%a%valuable%strategic%foundation,%facilitates%product%
stock% m anagem ent,%improves%management%efficiency,%and%provides%guidance%for% m ore%optimal%strategic%
decision-making.%
%
!
!
!
International!Journal!of!Social!Service!and!Research!% https://ijssr.ridwaninstitute.co.id/%
IJSSR!Page!3366
REFERENCES!
Baihaqi,% W.% M.,% Indartono,% K.,% &% Banat,% S.% (2019).% Penerapan% Teknik% Clustering% Sebagai% Strategi%
Pemasaran%pada%Penjualan%Buku%Di%Tokopedia%dan%Shopee.%7%.%3/,2%)")A5.&%+)!-2B50$.)9%&)
C&D-.2%0/>%,%EF(2),%243248.%https://doi.org/10.31294/p.v21i2.6149%
Chen,%L.,%Shan,%W.,%&%Liu,%P.%(2021).%Identification%of%concrete%aggregates%using%K-means%clustering%and%
level%set%method.%60.5805.$',%GH,%20692076.%https://doi.org/10.1016/j.istruc.2021.08.048%
Fauzi,%A.%(2017).% 9%0%) #/&/&,) 3$&,%&) I$>&/>) 4+5'0$./&,) #$&,,5&%>%&) *+,-./02%) !"#$%&') B%3%) 9%0%)
I.%&'%>'/)65B$.'0-.$.%
Griffin,%E.%C.,%Keskin,%B.%B.,%&%Allaway,%A.%W.%(2023).%Clustering%retail%stores%for%inventory%transshipment.%
J5.-B$%&) A-5.&%+) -D) KB$.%0/-&%+) L$'$%.81,% GFF(2),% 690707.%
https://doi.org/10.1016/J.EJOR.2023.06.008%
Hadi,% F.,% &% Diana,% Y.% (2020).% PENGKLUSTERAN% PENJUALAN% BAHAN% BANGUNAN% MENGGUNAKAN%
ALGORITMA%K-MEANS.% AKC6CJ) MA-5.&%+) KD) C&D-.2%0/-&) 6;'0$2') *&3) C&D-.2%0/8') J&,/&$$./&,N,%
H(1),%22.%https://doi.org/10.35145/joisie.v4i1.629%
Ikotun,% A.% M.,% Ezugwu,% A.% E.,% Abualigah,% L.,% Abuhaija,% B.,% &% Heming,% J.% (2023).% K-means% clustering%
algorithms:%A% comprehensive% review,% variants% analysis,% and% advances%in% the% era% of% big% data.%
C&D-.2%0/-&)68/$&8$',%OEE,%178210.%https://doi.org/10.1016/J.INS.2022.11.139%
Jabat,%J.%T.,%&%Murdani,%M.%(2019).%Penerapan%Data%Mining%Pada%Penjualan%Produk%Retail%Menggunakan%
Metode%Clustering.%7$+/0%)C&D-.2%0/>%P)C&D-.2%'/)9%&)C&D-.2%0/>%,%Q(1),%2632.%
Kashef,%R.,%& %Pun,%H.%(2022).%Predicting%l-CrossSold%products%using%connected%components:%A%clustering-
based% recommendation% system.% J+$80.-&/8) 4-22$.8$) L$'$%.81) %&3) *BB+/8%0/-&',% RG.%
https://doi.org/10.1016/J.ELERAP.2022.101148%
Khedmati,%M.,%&%Azin,%P.%(2020).%An%online%portfolio%selection%algorithm%using%clustering%approaches%and%
considering% transaction% costs.% J@B$.0) 6;'0$2') S/01) *BB+/8%0/-&',% FRT.%
https://doi.org/10.1016/J.ESWA.2020.113546%
Kuo,% R.%J.,%Rakhmat%Setiawan,%M.,%&%Nguyen,%T.%P.%Q.%(2022).%Sequential%clustering%and%classification% using%
deep%learning%technique%and%multi-objective%sine-cosine%algorithm.%4-2B50$.') %&3)C&35'0./%+)
J&,/&$$./&,,%FUG.%https://doi.org/10.1016/J.CIE.2022.108695%
Luu,%E.,%Xu,%F.,%&%Zheng,%L.%(2023).%Short-selling%activities%in%the%time%of%COVID-19.%=./0/'1)*88-5&0/&,)
L$V/$S,%RR(4).%https://doi.org/10.1016/J.BAR.2023.101216%
Meng,%Q.,%Huang,%H.,%Li,%X.,%&%Wang,%S.%(2023).%Short-selling%and%corporate%default%risk:%Evidence%from%
China.% C&0$.&%0/-&%+) L$V/$S) -D) J8-&-2/8') %&3) W/&%&8$,% QU,% 398417.%
https://doi.org/10.1016/J.IREF.2023.04.026%
Miao,%Y.,%Li,%S.,%Wang,%L.,%Li,%H.,%Qiu,%R.,%&%Zhang,%M.%(2023).%A%single%plant%segmentation%method%of%maize%
point%cloud%based%on%Euclidean%clustering% and%K-means%clustering.% 4-2B50$.')%&3)J+$80.-&/8')/&)
*,./85+05.$,%EFX.%https://doi.org/10.1016/j.compag.2023.107951%
Mudzakkir,% B.% D.% (2018).% Pengelompokan% Data% Penjualan% Produk% Pada% Pt% Advanta% Seeds% Indonesia%
Menggunakan%Metode%K-Means.%A*IC)MA5.&%+)#%1%'/'S%)I$>&/>)C&D-.2%0/>%N,%E(2),%3440.%
Nasution,%Y.%R.,%&%Eka,%M.%(2018).%Penerapan%Algoritma%K-Means%Clustering%Pada%Aplikasi%Menentukan%
Berat%Badan%Ideal.%*Y:KLCI#*P)A5.&%+)C+25)!-2B50$.)9%&)C&D-.2%0/>%,%E(1).%
Niu,%G.,%Ji,%Y.,%Zhang,%Z.,%Wang,%W.,%Chen,%J.,%&%Yu,%P.%(2021).%Clustering%analysis%of%typical%scenarios%of%
island%power%supply%system%by% using%cohesive%hierarchical%clustering%based%K-Means%clustering%
method.%J&$.,;)L$B-.0',%U,%250256.%https://doi.org/10.1016/j.egyr.2021.08.049%
Pelekis,%S.,%Pipergias,%A.,%Karakolis,%E.,%Mouzakitis,%S.,%Santori,%F.,%Ghoreishi,%M.,%&%Askounis,%D.%(2023).%
Targeted% demand% response% for% flexible% energy% communities% using% clustering% techniques.%
65'0%/&%?+$)J&$.,;():./3')%&3)Z$0S-.>',%GO.%https://doi.org/10.1016/J.SEGAN.2023.101134%
Purba,%W.,%Tamba,%S.,%&%Saragih,%J.%(2018).%The%effect%of%mining%data%k-means%clustering%toward%students%
profile% model% drop% out% potential.% A-5.&%+) -D) 71;'/8'P) 4-&D$.$&8$) 6$./$',% FXXU,% 012049.%
https://doi.org/10.1088/1742-6596/1007/1/012049%
International!Journal!of!Social!Service!and!Research,%%
Mohamad%Maulana%Ridzki
1
,%Ijah%Hadijah
2
,%Mukidin
3
,%Adelia%Azzahra
4
,%Aisyah%Nurjanah
5
%
IJSSR!Page%3367
Sinan,%M.,%Leng,%J.,%Shah,%K.,%&%Abdeljawad,%T.%(2023).% A dvances%in%numerical%simulation%with%a%clustering%
method%based%on%Kmeans%algorithm%and%Adams%Bashforth%scheme%for%fractional%order%laser%
chaotic% system.% *+$@%&3./%) J&,/&$$./&,) A-5.&%+,% UR,% 165179.%
https://doi.org/10.1016/j.aej.2023.05.080%
van%der%Borgh,%M.,% Nijssen,%E.%J.,%&%Schepers,%J.% J.% L.% (2023).%Unleash%the% power%of%the% installed%base:%
Identifying% cross-selling% opportunities% from% solution% offerings.% C&35'0./%+) #%.>$0/&,)
#%&%,$2$&0,%FXQ,%122133.%https://doi.org/10.1016/J.INDMARMAN.2022.11.010%
Vásquez% Sáenz,% J.,% Quiroga,% F.% M.,% &% Bariviera,% A.% F.% (2023).% Data% vs.% information:% Using% clustering%
techniques%to%enhance%stock%returns%forecasting.%C&0$.&%0/-&%+)L$V/$S)-D)W/&%&8/%+)*&%+;'/',%QQ.%
https://doi.org/10.1016/J.IRFA.2023.102657%
Wang,%X.,%Shao,%Z.,%Shen,%Y.,%&%He,%Y.%(2023).%Research%on%fast%marking%method%for%indicator%diagram%of%
pumping% well% based% on% K-means% clustering.% [$+/;-&,% T(10).%
https://doi.org/10.1016/j.heliyon.2023.e20468%
Windarto,%A.%P.%(2017).%Implementation%of%Data%Mining%on%Rice%Imports%by% Major%Country%of%Origin% Using%
Algorithm% Using% K-Means% Clustering% Method.% C&0$.&%0/-&%+) A-5.&%+) -D) *.0/D/8/%+) C&0$++/,$&8$)
L$'$%.81,%F(2),%26.%https://doi.org/10.29099/ijair.v1i2.17%
Zhou,%Q.,%&%Sun,%B.%(2023).%Adaptive%K-means%clustering%based%under-sampling%methods%to%solve%the%
class% imbalance% problem.% 9%0%) %&3) C&D-.2%0/-&) #%&%,$2$&0,% 100064.%
https://doi.org/10.1016/j.dim.2023.100064%
%%
Copyright!holder:!
Mohamad%Maulana%Ridzki,%Ijah%Hadijah,%Mukidin,%Adelia%Azzahra,%Aisyah%Nurjanah%(2023)!
!
First!publication!rights:!
International%Journal%of%Social%Service%and%Research%(IJSSR)%
!
This!article!is!licensed!under:!
!
!
%