Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
RachyRoo
New Member

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

1 ACCEPTED SOLUTION
MattAllington
Community Champion
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. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
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. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hi Matt

 

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

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors