Forum Discussion
Using LOOKUPVALUE to compare two values with duplicates
No, all the data is contained within the same table.
Here is a summary of what I'm looking to do:
For each PROJECT NAME, find the TASK NAME called "UAT" and select the START date. For each PROJECT NAME, find the TASK NAME called "NETWORK READY" and select the START date. Comp[are these two START dates. If the START date for UAT is greater than the START date for "NETWORK READY", output "GOOD". Else, output "BAD".
I've highlighted two example columns out of my data.
The output here in this case should be GOOD.
TIA
tlh , below is formula, i added a condition: if we are missing data for either uat or network days return "no compare".
Result =
VAR _UatStart =
LOOKUPVALUE (
Tasks[Start],
Tasks[Task Name], "UAT",
Tasks[Project Name], Tasks[Project Name]
)
VAR _NetworkStart =
LOOKUPVALUE (
Tasks[Start],
Tasks[Task Name], "NETWORK READY",
Tasks[Project Name], Tasks[Project Name]
)
RETURN
IF (
Tasks[Task Name] IN { "UAT", "NETWORK READY" },
IF (
AND ( NOT ( ISBLANK ( _NetworkStart ) ), NOT ( ISBLANK ( _UatStart ) ) ),
IF ( _NetworkStart > _UatStart, "IN TROUBLE", "ALL GOOD" ),
"NO COMPARE"
)
)
- lbendlin6 years ago
Super User
What is your plan for scenarios when either of the entries is missing or duplicated?
- tlh6 years agoFrequent Visitor
Thanks for your help, but still not working. Here is what I'm doing. I duplicated the data into a table called TestTable and updated your formula.
No plans for that yet. It should never happen as they are a part of the template used.
- nandic6 years ago
Resident Rockstar
tlh there are fields underlined with red line, it means that there is no such field in your table/model. Check these and make sure you type it correctly.
Another thing, if there are no underlined fields and you get error that it cant get single value (as on screenshot) it means that there is still column in table which we need to add in lookup as on current lookup parameters dax cant find unique value.