Forum Discussion

RachyRoo's avatar
RachyRoo
New Member
4 years ago
Solved

Power Query Editor custom column correct, but not when apply to model

Hi

 

I have created a custom column in Power Query Editor below which is working perfectly and returning the values that I want.

 

= Table.AddColumn(#"Changed Type1", "Duration", each if [End Time] > [Start Time]
then [End Time] - [Start Time]
else ([End Time] - Time.FromText ("00:00:00")) + (Time.FromText ("23:59:00") - [Start Time]))

 

When I close and upload the values in the model table aren't correct and I can't even really understand where they are coming from.  They are not all the same but large number of rows are returning the same value.

 

Any help would be appreciated.

 

Thanks

  • In PQ, bottom left, change "profile based on 1000 rows" to "profile based on entire data set". The issue may be coming further in the file processing. Then filter on rows to show the problem records. 

2 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    In PQ, bottom left, change "profile based on 1000 rows" to "profile based on entire data set". The issue may be coming further in the file processing. Then filter on rows to show the problem records. 

    • RachyRoo's avatar
      RachyRoo
      New Member

      Hi Matt

       

      It is always the simple things!  Thanks so much - works perfectly.