Forum Discussion
shermayne123
3 years agoHelper I
Calculate Net Working Days from dates in two different tables
Hi, I have previously used the following measure to calculate the net working days from 2 dates in the same table and was able to get the days correctly. But when I switched one of the dates to ...
- 3 years ago
Hi,
This calculated column formula in the ALL FYs table works
Column = LOOKUPVALUE('Perf metrics'[Contract Signed Date],'Perf metrics'[(PR) PR No.],'all Fys'[(PR) PR No.],'Perf metrics'[(PR) PR Item No.],'all Fys'[(PR) PR Item No.])Hope this helps.
- 3 years ago
Hi,
That error message means that there are duplicate entries appearing in the PR_REF_NO column of the System PR table.
shermayne123
3 years agoHelper I
Hi it's me again!
I need to obtain the difference between two dates from two different tables but this time, I wasn't able to pull in the date into the same table using the same set of codes as advised in my previous query above.
My code is:
System PR Start Date = LOOKUPVALUE('System PR Table'[START_TIME],'System PR Table'[PR_REF_NO],'Perf Metrics'[PR_Ref?])
The error message was: A table of multiple values was supplied when a single value was expected.
| Perf Metrics Table(relevant columns) | |||
| PR No | PR Item No | PR Ref | Contract Signed Date |
| PM22001 | 1 | PR-12345 | 5/5/2022 |
| PM23002 | 1 | PR-67890 | 4/6/2022 |
| PM21056 | 2 | PR-11121 | 7/7/2022 |
| System PR table | |||
| PR_REF_NO | START_DATE | ||
| PR-12345 | 4/4/2022 | ||
| PR-67890 | 4/5/2022 | ||
| PR-11121 | 3/6/2022 |
I tried creating a new column in the System PR table to bring in the PR No. and PR Item No.(concatenated to be PRNo:PRItemNo) based on the PR Ref so that I can use it to bring in the Contract Signed Date from the second table(Perf Metrics) but it also failed. My code was:
PRNOPRITEMNO = LOOKUPVALUE('Perf Metrics'[PRNO:PRITEMNO],'Perf Metrics'[PR_Ref?],'System PR '[PR_REF_NO])
The error message is the same as the above.
Hope someone can enlighten me on this, thank you so much!