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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Brianvt25
New Member

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

Hello,

 

I am trying to create a date table and I am receiving the following error: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

 

Below is my dax:

DateTable =
ADDCOLUMNS (
CALENDAR(MINX('PST',PST[Date Worked]),MAXX('PST',PST[Date Worked])),
"DateAsInteger", FORMAT ( [date], "YYYYMMDD" ),
 "Year", YEAR ( [date] ), "MonthNo", FORMAT ( [date], "MM" ),
"YearMonthNo", FORMAT ( [date], "YYYY/MM" ),
"YearMonth", FORMAT ( [date], "YYYY/mmm" ),
"MonthShort", FORMAT ( [date], "mmm" ),
"MonthLong", FORMAT ( [date], "mmmm" ),
"WeekNo", WEEKDAY ( [date] ),
"WeekDay", FORMAT ( [date], "dddd" ),
"WeekDayShort", FORMAT ( [date], "ddd" ),
"Quarter", "Q" & FORMAT ( [date], "Q" ),
"YearQuarter", FORMAT ( [date], "YYYY" ) & "/Q" & FORMAT ( [date], "Q" ))

 

I appreciate any support you can provide. 

1 ACCEPTED SOLUTION

I figured it out...

 

It looks like Iwas trying to save a table expression as a measure. A measure requires a scalar output, but if the measure expression results in a columnar or table-like output, you will usually get this type of error. I had to try the expression in the new table dialog, instead of a new measure dialog. Thanks for your help!

View solution in original post

9 REPLIES 9
Brianvt25
New Member

I tried disabling the auto  date/time in settings with no luck. I'ts weird because i've used this dax formula in all my pbix files in the past with no issue. 

can you post a screenshot showing the date worked column in the PST table ? It doesn't look like there's anything wrong with the DAX.

Brianvt25_1-1730393406941.png

 

Thanks. That's the Power Query view, can you show it in the desktop view, ideally the view in the data pane rather than the underlying data.

Like this?

 

Brianvt25_0-1730394981689.png

 

I figured it out...

 

It looks like Iwas trying to save a table expression as a measure. A measure requires a scalar output, but if the measure expression results in a columnar or table-like output, you will usually get this type of error. I had to try the expression in the new table dialog, instead of a new measure dialog.

The only thing I can think to try is to go into DAX Query View and run

EVALUATE
ROW (
    "@min", MINX ( 'PST', 'PST'[Date Worked] ),
    "@max", MAXX ( 'PST', 'PST'[Date Worked] )
)

See what result that gives

I figured it out...

 

It looks like Iwas trying to save a table expression as a measure. A measure requires a scalar output, but if the measure expression results in a columnar or table-like output, you will usually get this type of error. I had to try the expression in the new table dialog, instead of a new measure dialog. Thanks for your help!

johnt75
Super User
Super User

Have you disabled Auto Date/Time in settings ? If not, Power BI will have automatically created a date table which is referenced by PST[Date Worked]. Either disable auto date/time ( preferably ), or else you can replace the PST[Date Worked] with PST[Date Worked].Date.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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