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
Anonymous
Not applicable

Error with New Measure with DATEDIFF()

Hi. I am trying to new Measure with DATEDIFF. 

Example that I expected:

image.png

 

My stitution:

image (1).png

I guess the problem is table name and column name are written in Chinese. 

Table Name: COPTD-FT-客戶訂單單身資料檔

Column Names:  預交日 & 原預交日

These two columns type are Date.

 

Can anyone tell me how to deal with this problem? Thanks!

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

The problem is not in the Chinese name. The problem lies in the measure you use. If you use the measure, you need to add MAX/MIN here to determine the row of your column name.

Screenshot 2021-06-21 101149.png

 

If you are adding a calculated column, you do not need to use MAX/MIN, as shown below.

Screenshot 2021-06-21 101312.png

 

The difference is the context of evaluation. A measure is evaluated in the context of the cell evaluated in a report or in a DAX query, whereas a calculated column is computed at the row level within the table it belongs to.

Reference: measure vs calculated column

 

Best Regards,

Stephen Tao

 

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

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

The problem is not in the Chinese name. The problem lies in the measure you use. If you use the measure, you need to add MAX/MIN here to determine the row of your column name.

Screenshot 2021-06-21 101149.png

 

If you are adding a calculated column, you do not need to use MAX/MIN, as shown below.

Screenshot 2021-06-21 101312.png

 

The difference is the context of evaluation. A measure is evaluated in the context of the cell evaluated in a report or in a DAX query, whereas a calculated column is computed at the row level within the table it belongs to.

Reference: measure vs calculated column

 

Best Regards,

Stephen Tao

 

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

ryan_mayu
Super User
Super User

@Anonymous 

I think your column name displayed wrongly in your formula. maybe try to remove extra single qutotation marks.

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

Top Solution Authors