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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
rakshakcr777
New Member

Date table is not getting created (The expression refers to multiple columns)

Date =
VAR MinYear = ( MIN ( 'Final transactions'[Date] ) )
VAR MaxYear = ( MAX ( 'Final transactions'[Date] ) )+60
RETURN
ADDCOLUMNS ( CALENDAR(MinYear,MaxYear),"Calendar Year", "CY " & YEAR ( [Date] ),
    "Month Name", FORMAT ( [Date], "mmm" ),
    "Month Number", MONTH ( [Date] ),
    "Weekday", FORMAT ( [Date], "dddd" ),
    "Weekday number", WEEKDAY( [Date] ),
    "Quarter", "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1
)
3 REPLIES 3
Anonymous
Not applicable

Hi @rakshakcr777 ,

 

I agree with FreemanZ's idea. Please try to create a new table using these codes.

vcgaomsft_0-1672713075304.png

For more details you can refer to this Blog.

vcgaomsft_1-1672713223909.png

DAX Error: The Expression Refers to Multiple Columns. Multiple Columns Cannot Be Converted to a Scal...

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

MAwwad
Solution Sage
Solution Sage

This error message usually indicates that the expression in your ADDCOLUMNS function is using a column name that is not unique, or that is being used in multiple places in the expression.

To resolve this issue, you can try the following steps:

  1. Check the column names in your expression to make sure that they are unique and not being used in multiple places.

  2. If you are using a column name that is being used in multiple places in the expression, you can try qualifying the column name with the table name to make it unique. For example, you can use 'Final transactions'[Date] instead of just [Date].

  3. If you are using a column name that is not unique, you can try renaming the column or using a different column name.

  4. Make sure that you are using the correct syntax and formatting in your expression. For example, check that you are using the correct number of parentheses and that you are using the correct delimiters (such as commas or semicolons) to separate the different parts of the expression.

FreemanZ
Super User
Super User

hi @rakshakcr777 

the code seems fine.

please check if the code is used for table creation.  are you actually creating a measure?

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.