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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.