Fix the error A table of multiple values was supplied where a single value was expected.…
- User
Fix the error A table of multiple values was supplied where a single value was expected.
Table0 = SUMMARIZE( 'Customer_SKU_Date', 'Customer_SKU_Date'[Customer Code], 'Customer_SKU_Date'[SCU Code], "Date", DISTINCT('Customer_SKU_Date'[Date]) )
- Assistant
To fix the error, you need to modify the last line of code. You are currently using the DISTINCT function on the 'Customer_SKU_Date'[Date] column, which may return multiple values. However, the "Date" column in the SUMMARIZE function expects a single value.
To resolve this, you can use the MIN or MAX function to select a single date value. Here's the updated code:
Table0 = SUMMARIZE( 'Customer_SKU_Date', 'Customer_SKU_Date'[Customer Code], 'Customer_SKU_Date'[SCU Code], "Date", MIN('Customer_SKU_Date'[Date]) )