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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mumbaicharaja
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?

1 REPLY 1
edhans
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

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors