Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Error occurred while refreshing

Hi everyone, I'm fairly new to Power BI and I'm facing an issue with refreshing my dataset in Power BI Service. I've published my reports from Power BI Desktop, which are connected to a PostgreSQL database via ODBC using the connection string: driver={PostgreSQL Unicode(x64)};server=localhost;port=xxxx;database=database with Data cource name(DSN) as None. (But while trying to rempove the error below i did something that my powerbi desktop was also not fetchign the data, so changed the NONE option to dBASE Files. Now it is fetchign the data again) 

After publishing, I set up an on-premises data gateway, and in Power BI Service, the gateway appears online and the connection status shows as successful. However, when I click the refresh button in the Power BI Service, it takes a long time and then fails with the following error: "Data source error.

¨'The following system error occurred: Type mismatch. Table: memberships.'

I changed the data type of five columns in the memberships table from Date/Time to just Date. These changes are important for my calculations, so I can't change them back. Interestingly, the data still refreshes successfully in Power Query and in Power BI Desktop.

I also tried uploading a simplified version of the model with only raw data and no transformations, and that refreshes just fine in the Service. It seems like the issue may be related to the type change or how Power BI Service interprets it through the gateway. I would really appreciate any help or guidance in understanding what might be causing this "type mismatch" error and how I can fix it without reversing my column changes. Thanks in advance!

  • Hi Anonymous 

    If the Memberships table is the only one having problems despite similar changes being made to others tables, here are a few steps to investigate:

    • Even if data loads fine in Power Query, ensure the type changes are compatible with the data model. For example, converting numeric columns to text might work in some contexts but could cause issues in calculations or relationships.
    • If any calculated columns or measures rely on the Memberships table, they might break due to type changes or data format mismatches.
    • After changing column types, ensure there are no invalid or unexpected values in the Memberships table that could trigger errors during refresh.

    if the issue still persists request to raise a Support Ticket.

    Hope it helps !
    Regards,
    v-aatheeque

    If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

    If you continue to face issues, feel free to reach out to us for further assistance!

     




15 Replies

  • Have you considered using the native PostGres driver instead of ODBC?  

    • Anonymous's avatar
      Anonymous
      Not applicable

      I am not able to use it. Only this driver works that i am currently using. 

      • lbendlin's avatar
        lbendlin
        Super User

        What is the issue with the native driver?