Anonymous's avatar
Anonymous
Not applicable
5 years ago
Status:
New

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:

 

 

 

 

 

 

 

The 'udf_ConvertCAD_Goals' function expects the following:

 

 

 

 

 

 

 

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

(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:

 

 

 

 

 

 

 

 

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.

5 Comments

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity 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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity 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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    hi

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

     

    Regards,

    Lin