Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Error with New Measure with DATEDIFF()

Hi. I am trying to new Measure with DATEDIFF. 

Example that I expected:

 

My stitution:

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!

  • Anonymous's avatar
    Anonymous
    5 years ago

    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.

     

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

     

    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.

2 Replies

  • Anonymous 

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

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

     

    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.