Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Regular Visitor

custom function changes datatype during run time

In power query I got a custom function which picks up the data, does left join and returns the records properly. The tables are linked using t1.c1 and t2.c2. the data type of both columns is Text. It is tested using sample data file used for the function. When that custom function is called from some else place (i read all files from a folder and call the function for each of the file)...the function works correctly except for the data with last digit as zero. e.g. "01.10", "01.20" in this last value is zero wherein for t1 the value is automatically converted as "01.1" and in T2 the value is retained as "01.01". Bu then records doesn't get linked as the data alues are different. Please note, in both the tables field's data type is text, but it seems still it trims out zero from t1.c1 but not t2.c2. Also within custom function it seems to be working fine, but when caller makes the call to the function it doesn't return matching records. Any idea what could be the issue?

Super User
Super User

Virtually impossible to tell without some data and the code for your function.


How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum

Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling

Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors