RyanLocke1
4 years ago

# Bi Monthly Billing Calculated Field based off Date chosen

Good Evening,

I am new to quickbase and am trying to figure out a way to set up a filter where a user selects a date and then a report will filter for their current billing period. We bill bi-monthly 1-15th and 16th-30th or 31st.

I was hoping a user could enter a billing record and chose 08/05/2021 and once they save and close the record their dashboard will have a "Current Billing Period" report so they only see the entries for the Current Billing Period whatever date it falls in, and once we get to August 16th the report will refresh with just those entries.

Is there a good way to do that?

Or a calculated date field that would some how make a string like 08-01-2021 - 08-15-2021, based on the date would be great too.

Thank you,

Ryan

------------------------------
Ryan Locke
------------------------------
• Ryan

I'm going to assume your field is calling [Invoice Date].  I'm typing on an ipad from a hotel room with a beer, so hopefully this will work.

Try this. Make two fields.  The first is called [Billing Period Start of Invoice Date]

var date MyDate = [Invoice Date];
var number DayNumber = IF(Day(\$MyDate) <= 15, 1, 16);

Date(Year(\$MyDate), Month(\$MyDate), \$DayNumber)

// the formula above will return the date of the start of the Billing Period.

Then duplicate the field and call it [Billing Period Start of Today]

but change the date field to be Today()

var date MyDate = Today();
var number DayNumber = IF(Day(\$MyDate) <= 15, 1, 16);

Date(Year(\$MyDate), Month(\$MyDate), \$DayNumber)

now easy peasy, just filter the Report where those  two fields are equal.

Post back if you have have any problems. I'm cycling so I will be slow to respond.

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
• What is the value you're calculating the timeframe on? Is it all records due on the 15th or the 31st or is it based on some form of date criteria already- i.e. contract start date, user input deadline?

It seems like when building a table you should be able to set criteria similar to the below based on what you're reference field is (i'm using deadline as an example):

To have on the homepage dashboard, it won't show a table that requires a "user select" date, you'd need to create a shortcut button to the full table if you want to sort based on something that the user selects uniquely each time.
You could however show the above formula and also add a criteria of something like "sales person= the current user" and it would show only records for that user with the additional criteria.

Hope I understood what you meant!

------------------------------
Korrie Clark
------------------------------
• Ryan

I'm going to assume your field is calling [Invoice Date].  I'm typing on an ipad from a hotel room with a beer, so hopefully this will work.

Try this. Make two fields.  The first is called [Billing Period Start of Invoice Date]

var date MyDate = [Invoice Date];
var number DayNumber = IF(Day(\$MyDate) <= 15, 1, 16);

Date(Year(\$MyDate), Month(\$MyDate), \$DayNumber)

// the formula above will return the date of the start of the Billing Period.

Then duplicate the field and call it [Billing Period Start of Today]

but change the date field to be Today()

var date MyDate = Today();
var number DayNumber = IF(Day(\$MyDate) <= 15, 1, 16);

Date(Year(\$MyDate), Month(\$MyDate), \$DayNumber)

now easy peasy, just filter the Report where those  two fields are equal.

Post back if you have have any problems. I'm cycling so I will be slow to respond.

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
• Thank you, Mark! Such a great tip! I'm really going to like this Quickbase Community! Thank you for the help!

------------------------------
Ryan Locke
------------------------------
• Hey Mark,
That worked perfectly, I did have a question. Do you know a good way to get the Billing Period End Date? I am getting tripped up on if it ends in 30 or 31, and also Feb. Thank you!!!

------------------------------
Ryan Locke
------------------------------
• There is a convenient function call LastDayOfMonth, so for example LastDayOfMonth(Today()) would be August 31st because as i type this the date is August 18th.

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------