Forum Discussion

Charu's avatar
Charu
Icon for Post Patron rankPost Patron
7 years ago
Solved

Custom date FORMAT measure/column in Direct query mode

Dear All,

 

is there any possibilities to write a DAX formula for Custom india date format like dd-mm-yyyy in a direct query mode?

 

1.In Calculated column FORMAT is not support in direct query mode

2.In Measure couldn't call the date column from the table.

Like Measure=FORMAT('Table1'[Created_Date],"dd-mm-yyyy")

 

Kindly please help me out on this.

 

 

Thanks in advance

 

  • Charu's avatar
    Charu
    7 years ago

    Hi BhaveshPatel

     

    Thank you so much for your Idea.

    The below calculated column worked fine.

     

    Calculated Column = DAY('Table1'[Creation_Date]) & "/" & MONTH('Table1'[Creation_Date]) & "/" & YEAR('Table1'[Creation_Date])

5 Replies

  • You can try splitting your date column in query editor and then using the merge columns feature, combine as per the indian date format. "dd-mm-yyyy". 

     

    In case, this step may not be supported then you can use combination of LEFT, RIGHT functions to extract dd, mm, yyyy and then concatenate all together.

     

     

     

    Thanks

    Bhavesh

    • Charu's avatar
      Charu
      Icon for Post Patron rankPost Patron

      Hi BhaveshPatel

       

      Thank you so much for your Idea.

      The below calculated column worked fine.

       

      Calculated Column = DAY('Table1'[Creation_Date]) & "/" & MONTH('Table1'[Creation_Date]) & "/" & YEAR('Table1'[Creation_Date])
      • RyanP's avatar
        RyanP
        Icon for Advocate II rankAdvocate II

        Doesnt pad the zero for January through September :/