Forum Discussion
Find the value in column [A] that aligns with explicit values in columns [B], [C, [D]
I am trying to set up a flag that I can display to determine the current status of a number of projects.
My base DB is set up in this way:
- [Project Name] - each project has an ID
- [Section] - Variable groupings for ease of access (ex: Schedule, Execution times, Economics...)
- [DG] - Decision Gate, the milestone when the data was recorded (DG1, FID...). I am interested in the values tagged as 'Actual' here
- [Variable] - the name of the metric being measured/tracked (ex: Date of Decision Gate 1, Date of First Investment, Date of Project Operations starting...)
- [Base]/[Date] - the actual values, split out because numbers and dates don't play nice
I am trying to set up a way that I can tag each Project as the value in [Variable] that is based on the last date value in the [Date] column with "Actual" for [DG], per Project.
I asked around yesterday an the recommendation was three fold:
1) create a new table based on
Distinct Project Names = DISTINCT(base[Project Name])
2) create a measure in the 'Project Names' table to flag the last date entered, which matches up with the status that I am looking for. This works as intended.
3) create another measure in the 'Project Names' table to find the variable that aligns with the [cm_DGDate]. This does not work as desired, instead just returning the first unique value in variable sorted alphabetically.
I've been poking around all morning today and think that the LookUpValue function as a measure should work. But it doesn't. I need help figuring out why or a different method to do this.
This works fine when I have a filter to only one project. When I add 2+ projects to the filter it returns the error "A table of multiple values was supplied where a single value was expected".
It seems logical to me that I could add in the following arguments:
but it will not let me call the key defining column of the table.
My questions:
- Why does LookUpValue not draw on the key column in the table? I thought measures were supposed to call on a unique ID based on the variables in each row of the table? Especially when it has no problem pulling the other calculated column [cm_DGGate]
- Is there a way to get LookUpValue to pull the Project Name?
- Is there another function that provides this ability to match the value in column [Variable] that aligns with explicit values in columns [DG], [Project Name], [Section]?
edit: removed amgibuity mentioned below.
2 Replies
- lbendlin
Super User
please clarify if you meant calculated column or measure. The term "calculated measure" is ambiguous.
- bernardclarkNew Member
Measure.
I had it stuck in my mind that they were called calculted columns and calculated measures.