Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello
I want to calculate the diff between 2 dates in diff tables with relationship many to many
Both files are the same.
One column is called CUID and is a unique customer number
and GLD is the Go live date of the project.
I'm trying this formula but I get an error: A table of multiple values was supplied where a single value was expected.
I can have blanks if date is not yet confirmed
Any idea?
thanks
Solved! Go to Solution.
The error message you're receiving indicates that the lookup value function is returning multiple values where a single value was expected. This can happen if there are multiple records in the 'Baseline-PV Daily Extract' table that match the CUID in the 'Planview Daily Extract' table.
To avoid this error, you can use the maxx function to return the maximum value of the 'GLDate' column for each CUID in the 'Baseline-PV Daily Extract' table. This ensures that only a single value is returned for each CUID.
Here's the updated formula:
GLD Diff = DATEDIFF(
'Planview Daily Extract'[GLD],
MAXX(FILTER('Baseline-PV Daily Extract', 'Baseline-PV Daily Extract'[CUID] = EARLIER('Planview Daily Extract'[CUID])), 'Baseline-PV Daily Extract'[GLDate]),
MONTH
)
hope this helps
The error message you're receiving indicates that the lookup value function is returning multiple values where a single value was expected. This can happen if there are multiple records in the 'Baseline-PV Daily Extract' table that match the CUID in the 'Planview Daily Extract' table.
To avoid this error, you can use the maxx function to return the maximum value of the 'GLDate' column for each CUID in the 'Baseline-PV Daily Extract' table. This ensures that only a single value is returned for each CUID.
Here's the updated formula:
GLD Diff = DATEDIFF(
'Planview Daily Extract'[GLD],
MAXX(FILTER('Baseline-PV Daily Extract', 'Baseline-PV Daily Extract'[CUID] = EARLIER('Planview Daily Extract'[CUID])), 'Baseline-PV Daily Extract'[GLDate]),
MONTH
)
hope this helps
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |