How to Create a Text Value for a label out of an IFS() Expression

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.

IFS([Date] >= any(select(Pay Periods[Start Date],True)), [Date] <= any(select (Pay Periods[End Date], true)))

Solved Solved
1 9 364
1 ACCEPTED SOLUTION

Hey @Ray_Bibby

This is something I do all the time, here’s the general setup I typically have for the following scenario:

  • I have a table that holds records of Timesheets
    • Inside that table, there is a Date column
  • I have a table that holds the start and end date of each pay period
    • I have made a slice pulling out the “Current_Pay_Period” with a formula like this:

And(
TODAY() >= [Pay_Period_Start_Date],
TODAY() <= [Pay_Period_End_Date]
)

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:

IFS(and(
  [Timesheet_Date] >= INDEX(Current_Pay_Period[Pay_Period_Start_Date], 1), 
  [Timesheet_Date] <= INDEX(Current_Pay_Period[Pay_Period_End_Date], 1)
),
  "This Pay Period"
)

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).


Is that something like what you were thinking?

View solution in original post

9 REPLIES 9
Top Labels in this Space