I am new to AppSheet but I am trying to create a “Label” Out of an IFS() expession. Basically if it returns True I want a Label that says “This Pay Period”. I am pulling the info from a range of dates and comparing them to a list of dates. I have tried everything I can think of from the simple Display Value to changing the formula. On my app View it just says [Blank]?
Here is what I have so far.
Here is what I have so far.> > IFS([Date] >= any(select(Pay Periods[Start Date],True)), [Date] <= any(select (Pay Periods[End Date], true)))
@Ray_Bibby
ANY() expression pulls out the very first item in a list. So provided you are trying to sort out particular date range, this may not work as expected.
Ray_Bibby:
I am trying to create a “Label” Out of an IFS() expession. Basically if it returns True I want a Label that says “This Pay Period”. I am pulling the info from a range of dates and comparing them to a list of dates. I have tried everything I can think of from the simple Display Value to changing the formula. On my app View it just says [Blank]?
May I ask what exactly do you mean with the word: “Label”? Are you trying to create a table grouping header or are you trying to construct a label for a table to use as the REF column labelling?
Yes I am trying to create a table grouping header for “This Pay Period” and then another for “Last” or “Past pay Periods” and maybe even have it track the hours worked for the “This Pay Period”.
If I wanted to create a label for each Timesheet row, that showed whether or not the timesheet was inside the “Current_Pay_Period” slice, I would use a formula like this:
This will either have the text shown above (if the condition is TRUE), or it will be blank (if the condition is FALSE - meaning the timesheet date is NOT inside the current pay period).
This is great @MultiTech_Visions , I have used the Formula and it works great, then I added to it a bit to make a seperate heading for “Past Pay Periods” and when I test it the formula works great but I get a heading of “Blank” again instead of “Past Pay Periods”
Here is the formula I have
IFS(and(
[Date] >= INDEX(Current Pay Period[Start Date], 1),
[Date] <= INDEX(Current Pay Period[End Date], 1)
),
“This Pay Period”
,
and( [Date] >= INDEX(Current Pay Period[Start Date], 2),
[Date] <= INDEX(Current Pay Period[End Date], 2)
),
“Past Pay Periods”