Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

FORMAT function, not accepting optional 3rd parameter.

I am trying to force display some dates in en-US, since my collation is different.

 

So; i have this code: 

 

VAR FirstDateV =
FORMAT(
FIRSTDATE('Date'[Date])
,"Long Date"
)

 

I have tried many times, and whenever i try to pass the 3rd optional parameter ("en-US) it fails.

 

Why am I unable to pass the 3rd parameter?

 

FORMAT function (DAX) - DAX | Microsoft Docs

3 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    I tested it,  and it is working.

    Measure = FORMAT(FIRSTDATE('Table'[Date]),"Long date","en-US")

    The final show:

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    Is your problem solved? 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,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.