Forum Discussion

ConorHG's avatar
ConorHG
Helper I
8 years ago
Solved

PowerBI ordering Dates

Hi, 

 

I have two columns an Admission Date and a Discharge Date. 

 

I am trying to do a datediff() between the two columns but I have noticed in the data view that every row of the two columns are the exact same, although they are not the same in the query editor? 

 

Both columns are set as date-time fields, and both are sorted by there own columns. Is powerbi somehow changing the sort of the data? 

I just want the data to look to look the exact same as it does in the source, which it does in the query editor but not in the data view? 

 

Any help would be appreciated. 

 

Thanks, 
Conor.

  • ConorHG's avatar
    ConorHG
    8 years ago

    Hi All, 

     

    Thanks for replies and sorry for the delay in replying. 

    Managed to resolve the issue.

     

    PowerBI was automatically formatting the columns as DateTime fields but when I converted them to Date fields (as a new step) 

    this seemed to resolve the issue. 

     

    Thanks, 
    Conor.

3 Replies

  • caan you share the screen shot? I never seen this, try to refresh data and see if it works.

    • ConorHG's avatar
      ConorHG
      Helper I

      Hi All, 

       

      Thanks for replies and sorry for the delay in replying. 

      Managed to resolve the issue.

       

      PowerBI was automatically formatting the columns as DateTime fields but when I converted them to Date fields (as a new step) 

      this seemed to resolve the issue. 

       

      Thanks, 
      Conor.