Report with related table using a Select() function

In the process of creating a report to run at month’s end of employee mileage. The app is set up with a 1:M type of relationship. Employee table with a Reference column to the mileage table. I have a virtual column in the Employee table that works perfectly for what I want and that is pulling only those mileage records within the month using this select function:

Select(Mileage[Miles], And([Employee] = [_THISROW].[Employee], [Date] <=EOMONTH(TODAY(), 0),[Date] >=EOMONTH(TODAY(), -1)))

I am able to SUM that to get a total of miles per month per employee.

My report is nearly 100% except that for the life of me I can’t get an expression to work to see the breakdown in the table of only the records pertaining to the current month. Everything I try using the [Related Mileages] reference column has been a bust also with the Select function at the top.

Solved Solved
0 6 257
1 ACCEPTED SOLUTION

Marc, virtual covid elbow bump.

That key column was the “key” to my undoing. This worked :

<<Start: Select([Related Mileages][Record ID], And([Date] <=EOMONTH(TODAY(), 0),[Date] >=EOMONTH(TODAY(), -1)))>><<[Date]>>

I haven’t designed any super complicated apps for a few years now. Most of mine are now in the “set it and forget it” mode. Very out of practice! Tons of thanks.

View solution in original post

6 REPLIES 6
Top Labels in this Space