Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
waleed111
Helper V
Helper V

A table of multiple values was supplied where a single value was expected.

when i make this formula :
Date = MAXX('List View',
CALENDAR(
MINX('List View','List View'[start date]), MAXX('List View','List View'[end date])
)
)
it gave me this error:
A table of multiple values was supplied where a single value was expected.
*Date: is a column.
what is the problem?
6 REPLIES 6
v-xicai
Community Support
Community Support

Hi  @waleed111  ,

 

Do the suggestions from engineers make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

my question is: why i cannot get column from this formula:

CALENDAR(
MINX('List View','List View'[start date]), MAXX('List View','List View'[end date])
)
it return table with single column just, then why it cannot used as a column.
v-xicai
Community Support
Community Support

Hi @waleed111 ,

 

You may create a calendar table like DAX below.

 

Calendar= CALENDAR(MIN( 'List View'[start date]), MAX('List View'[end date]) )

 

Or you would like to get the largest Date value of 'List View'[start date] and 'List View'[end date], the create measure like DAX below.

 

MaxDate= MAX(MAX('List View'[start date]), MAX('List View'[end date]))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

i want to create a column using this formula:

date =
CALENDAR(
MINX('List View','List View'[start date]), MAXX('List View','List View'[end date])
)
but it show me this error:
A table of multiple values was supplied where a single value was expected.
 

Hi @waleed111 ,

 

From the article https://docs.microsoft.com/en-us/dax/calendar-function-dax, we know the CALENDAR function will returns a table with a single column named "Date" that contains a contiguous set of dates, and it should be used in a calculated table instead of calculated or measure, except used in variable.

 

The second argument of MAXX function should be a expression, while the CALENDAR() will return a table , which lets the error message appear.

 

So you may try to use the formulas which I have offered above to achieve your requirement.

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@waleed111 , if you want a date table

Date =
CALENDAR(
MINX('List View','List View'[start date]), MAXX('List View','List View'[end date])
)

 

a max date

Date = MAXX(
CALENDAR(
MINX('List View','List View'[start date]), MAXX('List View','List View'[end date])
),[Date]
)

 

it is as good as MAXX('List View','List View'[end date])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.