0

I used the following set analysis to capture the next date on column Next Repair Date

=DATE(MIN({<[Next Repair Date] = {">=$(=TODAY())"}>} [Next Repair Date])).

Next I stored the expression into a variable and used another set analysis to capture column Car Repair Maintenance Service based off of the Next Repair Date

=only({<Date={'$(=$(NextRepair))'}>} [Car Repair Maintenance Service])

However, I get nothing when I apply this expression.

What is causing my set analysis to not capture any data? It show capture data Engine Modifications based off this script.

enter image description here

Stefan Stoichev
  • 4,615
  • 3
  • 31
  • 51
George
  • 39
  • 3
  • think its because the variable is actually calculated before being used in the table expression. What you can try is to have the variable as string and then use this string in the expression. This way the variable will be calculated in the context of the expression – Stefan Stoichev Oct 26 '22 at 09:05

1 Answers1

0

It's hard to say because we don't know how your [Date] field fits into this but in your Car Repair Maintenance Service expression...

=only({<Date={'$(=$(NextRepair))'}>} [Car Repair Maintenance Service])

...you may be running into a problem with the formatting (or lack thereof) of your '$(=$(NextRepair))' expression. You may want to try doing '$(=Date(NextRepair, 'M/D/YYYY'))'.

It'd be good to get more context on what you're trying to achieve here, though.

SmoothBrane
  • 721
  • 4
  • 5