Hi everyone
Got a quick question:
Iโm creating a select expression for a reportโฆ and iโve managed to make it work ALMOST to the point of perfection but iโve stumbled on a seemingly simple step.
Hereโs my expression:
SELECT(
JOB_MAIN_AREAS[MAIN_AREA_UID],
AND(
IN([Foreman],[Related CHECKPOINT_MASTERs][Job Original Foreman]),
[Related CHECKPOINT_MASTERs][CreatedDate] >= [FROM],
[Related CHECKPOINT_MASTERs][CreatedDate] <= [TO],
))
My original expression was only included the IN() expression and that was great because i did get a list of areas where the selected [Foreman] = [Job Original Foreman].
And now i simply want to limit this list of areas even more but not just by matching the Forman columns but also by comparing the datesโฆ
Any ideas?
Solved! Go to Solution.
Maaaaybe this???
FILTER(
"JOB_MAIN_AREAS",
ISNOTBLANK(
SELECT(
[Related CHECKPOINT_MASTERs][_ROWNUMBER],
AND(
[Job Original Foreman] = [Foreman]),
[CreatedDate] >= [FROM],
[CreatedDate] <= [TO]
)
)
)
)
Should the CreatedDate values be those from the matching Job Original Foreman rows?
Yes @Steve exactly right!
The [Foreman] match is a prerequisiteโฆ
I guess i could do it in two VCs or something like that
Create a VC#1 with all the Main Areas matching the foremanโฆ and then a VC#2 that filters out based on the date rangeโฆ and use that as the basis for the reportโฆ but seems like a bit of a clunky solution. Not very elegant. Amateurish. Inefficient.
This is for the reportโs <<Start>>
expression?
Yes exactlyโฆ preferably i would like to build the list in the template and not use any VCs.
Maaaaybe this???
FILTER(
"JOB_MAIN_AREAS",
ISNOTBLANK(
SELECT(
[Related CHECKPOINT_MASTERs][_ROWNUMBER],
AND(
[Job Original Foreman] = [Foreman]),
[CreatedDate] >= [FROM],
[CreatedDate] <= [TO]
)
)
)
)
As always
(thereโs a rogue parentheses in there - removed)
I had a quick follow up question.
So this now generates a list of Ref values. Is there a way to Tap into them? What if i needed to sum up a list of numeric values each of which is stored in each of these refs?
Sorry for the basic questionsโฆ
EDIT: Actually managed to do it myself thanks for the massive help anyway!
User | Count |
---|---|
18 | |
13 | |
8 | |
4 | |
2 |