cancel
Showing results for 
Search instead for 
Did you mean: 

Invoked Custom Function not working on shared data model

I have a data model on the Power BI desktop application that has an invoked custom function within it. The custom function is entered as seen below:

CRamirez_0-1621954732480.png

 

 

 

 

 

 

 

The 'udf_ConvertCAD_Goals' function expects the following:

CRamirez_1-1621955237910.png

 

 

 

 

 

 

 

The 'year1' column that is being entered into the function looks like this:

CRamirez_2-1621958328386.png

(the year values continue on to 2021)

 

 

 

 

 

 

When I test this on the data model this results in the data looking like below, which is expected:

CRamirez_0-1621958530096.png

 

 

 

 

 

 

 

 

However, when I try to make this exact same visual on a separate report connected to this data model, the 'xchange' column is completely blank. I am on the updated data model view, the gateway, and Power BI desktop are all on the most recent update as well. This was working completely fine about 2 weeks ago and I'm not entirely sure what I can do differently to fix this.

Status: New
Comments
v-lili6-msft
Community Support

hi

I have tested on my side, it works well.

I just use this simple way to create a simple pbix file, then publish to power bi service.

Now open a new power desktop and connect to this dataset, it works well.

 

Please check if this column has value in power bi service report, and also have a refresh dataset.

 

if still have the problem, please share your sample pbix file for us have a test.

 

 

Regards,

Lin

CRamirez
Advocate II

@v-lili6-msft ,

 

Thank you for your response, I went to the link you provided and that is exactly the same way I am creating this function.

 

I dug a little more into this as I was trying to come up with a sample data model and what I've found is that the custom function works great among shared data models until I connect it to the on-premise gateway. What could potentially be the cause of that? I see that all of my data sources are successfully connecting, and the credentials on those sources are fine, but the data still isn't appearing?

 

I don't think a sample pbix file will help in this case because you wouldn't be able to connect to our organization's on-premise gateway. Could this be due to a recent update?

 

Thanks again.

v-lili6-msft
Community Support

hi

i use my on-premise sql database as datasource and then use Invoked Custom Function create a custom column, publish to power bi service and set on-premise gateway refresh the dataset.

 

Now use power bi desktop connect to it, it works well.

 

by the way, my on-premise gateway is 2020 Nov version. If you could use Previous monthly version to have  a test.

https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-monthly-updates

 

 

Regards,

Lin

CRamirez
Advocate II

@v-lili6-msft ,

 

Should I just open a ticket directly with Microsoft support as this is not working for me and it doesn't seem like I am doing anything incorrectly on my side

v-lili6-msft
Community Support

hi

if so, just open a ticket directly to get further help from Microsoft support team.

 

Regards,

Lin