Display Name Expression Not Working

I have the following expression.

LOOKUP([RPFinishDate], “ReportPeriod”, “Week -1 Date”, “RPBanner”)

This works fine in a regular Virtual Column Formula, but does not work as a Display Name Formula. Any suggestions?

0 13 624
13 REPLIES 13

Steve
Platinum 4
Platinum 4

First, you should prefix [RPFinishDate] with [_THISROW].:

LOOKUP([_THISROW].[RPFinishDate], “ReportPeriod”, “Week -1 Date”, “RPBanner”)

Second, which Display Name are you referring to? The one in a column configuration, or the one in a view configuration?

See also:

Thanks Steve. I am referring to the Display name in Column Configuration. This is what I am getting.

What are you trying to accomplish with the LOOKUP() expression, in plain language?

I am needing a conditional display name for a column header in table view.

As I mentioned before my original LOOKUP() worked great in a regular Virtual Column formula, but for some reason won’t work as an expression in the Display Name Column formula. I am in fact struggling to get any expression to work as a Display Name formula.

Display Name for a column applies to the entire column, not just the column of a single row. It is only evaluated at sync time, or if a row is opened in a form view.

Given what you’re doing, and the error message, my previous advice to add [_THISROW]. was wrong, so you may remove it.

Your original LOOKUP() expression:

LOOKUP([RPFinishDate], “ReportPeriod”, “Week -1 Date”, “RPBanner”)

will produce the value of the RPBanner column from the first row of the ReportPeriod table wherein the RPFinishDate column value of that same row is equal to the Week -1 Date column value also of that same row. Is that your intention?

That’s helpful. My intention was that the Column Display Name would dynamically update when the Week -1 Date updates. Am I taking it then that this is not possible, or have you any suggestions?

Your expression is looking through a table. If your table has more than one row, how would you determine which row is the one to use?

I have a table with many rows of dates and then a Virtual Column which dynamically changes based on it’s relationship with TODAY() and the table dates. This in effect gives me a single row entry in a column (Virtual) which moves by itself and that other expressions can relate themselves to. Every time the date clicks over to a new day the VC row has changed and it’s now pulling a fresh row of data.

It was some of this fresh data I wanted to display in the column header in table view.

How would you determine which row is the one to use?

Because the VC column only ever has 1 entry in it.

So I’m working on something similar and I realized that while the VC I made only has one value in it, that could change if users add more rows.

I got dynamic display names by finding the minimum value of all rows in a specific column and then manipulating that. In my example, I plan on making VC’s for dates in a range and wanted the headings to be a singular date. This is what I used:
TEXT(
MIN(TableName[Date])+1, “DDD MMM. D”
)

This expression will find the earliest date in the Date column, add one day to it, and assign the TEXT() expression to the column display name. I plan on using 5 VC’s to show a Yes/No value for 5 different dates determined by the starting value of [Date]

Had the same issue. Since my VC was also the same for each row, I went with

ANY(tableName[columnName])

Try this one to see if it will help.

Index(tableName [ columnName ], randbetween([_rowNumber]-[_rowNumber]+2,count(tableName [ columnName ])))

Top Labels in this Space