I have written an IFS expression and it’s doing what I want it to do but in one of the IFS scenarios I need to remove seconds and no matter where I place the TEXT() function it won’t remove seconds, or at least not the way I want it to.
If I wrap the CONCATENATE () function in TEXT() it doesn’t remove seconds.
If I place it inside the CONCATENATE () function it doesn’t remove seconds.
If I wrap each of the ANY(SELECT()) in TEXT () it does remove seconds but it also displays time in AM-PM format (I need it to be 24h format).
Could anybody point me in the right direction?
(thank you for all the amazing posts and articles. I was able to write this and many other expressions by myself just by reading tons here and learning from this community)
here’s my expression(posting from smartphone, sorry about the crappy format and indentation and/or lack thereof)
IFS(
AND(
ISBLANK([1dallealle]),
ISBLANK(
ANY(
SELECT(Registro presenze[Data],
AND(
DAY([Data])=“1”,
YEAR([Data])=YEAR(TODAY()-5),
([Tirocinante] = [_THISROW].[Tirocinante]),
MONTH([Data])=MONTH(TODAY() - 5)),
FALSE
)
)
)
)
,
“------------”,
AND(OR(ISBLANK([1dallealle]),[1dallealle]=“-”),
ISNOTBLANK(
ANY(
SELECT(Registro presenze[Timestamp],
AND(
DAY([Data])=“1”,
YEAR([Data])=YEAR(TODAY()-5),
([Tirocinante] = [_THISROW].[Tirocinante]),
MONTH([Data])=MONTH(TODAY() - 5),
[Assenza]=“Assente”),
FALSE
)
)
)
)
,
“Assente”,
OR(ISBLANK([1dallealle]), [1dallealle] =“-”), TEXT(
CONCATENATE(
ANY(
SELECT(Registro presenze[Entrata],
AND(
DAY([Data])=“1”,
YEAR([Data])=YEAR(TODAY()-5),
([Tirocinante] = [_THISROW].[Tirocinante]),
MONTH([Data])=MONTH(TODAY() - 5)),
FALSE
)
),
“-”,
ANY(
SELECT(Registro presenze[Uscita],
AND(
DAY([Data])=“1”,
YEAR([Data])=YEAR(TODAY()-5),
([Tirocinante] = [_THISROW].[Tirocinante]),
MONTH([Data])=MONTH(TODAY() - 5)),
FALSE
)
)
)
)
,
AND(ISNOTBLANK([1dallealle]), [1dallealle]<>“-”), [1dallealle])
