SUM BASED ON ENUM OR ENUMLIST

SUM(SELECT(ABSEN[DAY OFF],[ID TEACHER]=[_THISROW].[ID TEACHER])))

31.3.png

 Hi there,

Pless help me, how to SUM "day off" based on "because of vacation" in table "ABSEN". "Because of vacation" type enum or enumlist.

0 10 176
10 REPLIES 10

Not 100% sure what you are looking for, but if it's an EnumList, then something like..

SUM(SELECT(ABSEN[DAY OFF],AND(IN("TheReason",[Because of vacation]),[ID TEACHER]=[_THISROW].[ID TEACHER])))

 

SUM(SELECT(CUTI[HARI BERCUTI],OR
([SEBAB CUTI]="CUTI REHAT KHAS (CRK)",
([SEBAB CUTI]="CUTI SAKIT (MC)",
([SEBAB CUTI]="CUTI TANPA REKOD (CTR)",
([SEBAB CUTI]="CUTI KUARANTIN",
([SEBAB CUTI]="CUTI BERSALIN",
[ID GURU]=[_THISROW].[ID GURU]
)))))))

My formula like this,

i want result will come if ANY of these statements is true in [sebab cuti].

sory for my bad english.

 

What's wrong with your formula?

This formula will SUM all day off without following ANY of these statements if selected, for example;

if i selected CUTI REHAT KHAS (CRK) the result will show 4 day off not 1 day off

CUTI REHAT KHAS (CRK) = 1 day off

CUTI TANPA REKOD (CTR) = 3 day off

 

Do you want to dynamically select the "SEBAB CUTI" in another table and it would select only those rows from the CUTI table?

โ€œSEBAB CUTIโ€ in CUTI table,sir.

But do you select the SEBAB CUTI for the filtering in another table?

No sir

Not sure what you are looking for. In the printscreen  you showed.. what is the column name where this formula should be? 

2024-04-01 10 23 17.png

 

 

 

 

 

Sir, this from app view, when i select any button in "Sebab Cuti"  result will appear in "Baki Sebelum Cuti" after SUM day off in table "CUTI". 

2024-04-01 10 26 08.png

Top Labels in this Space