Here's one approach. First, I would recommend creating a date scaffold, which will give you at least one row per day.
Here's a post that lists several add'l posts about it: Data Scaffolding in Tableau
Here's a blog post that also might be helpful: https://www.kenflerlage.com/2019/03/date-scaffold.html
Step One: Create a Workbook in Excel that has all the days of 2019
Step Two: Join that to your existing data with Created Join calcs of 1=1
Step Three: Create a calculated field to filter to only relevant dates
Applicable Dates Filter
Step Four: Drag Applicable Dates Filter to Filters card and set to 'True'
Step Five: Create a Calculated Field to get the correct count of Monday-Thursday days possible, to date
iif(datepart('weekday',[Date])<>1 AND datepart('weekday',[Date])<6,1,0),
iif([Date]<=TODAY(),iif(datepart('weekday',[Date])<>1 AND datepart('weekday',[Date])<6,1,0),0))
Step Six: Create Actual Class Length to Date Calculated field
Actual Class Length to Date
Step Seven: Create Days Missed to Date calc
Days Missed To Date
[Actual Class Length to Date]-[Actual Class Length to Date]*MAX([Student Percentage]/100)
Step Eight: Double-Click on each of your new measure to add to the view
End result should look like this:
I've attached a packaged workbook for reference.
Please mark/let me know if this was helpful/answered your question.
test attendance_v2019.1.twbx 15.1 KB
Thanks! I will give you an update after I try it.
Sorry it took me so long to get back to you. It worked great. There would have been no way that I could have figured this out.
Thank you so much!!!
You're welcome! Glad it worked out!