<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to prevent automatic datatype conversion with database connection in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458511#M31291</link>
    <description>&lt;P&gt;Power BI does not have a duration datatype, the only type that supports Hours : Minutes : Seconds is the datetime datatype&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types" target="_blank"&gt;Data types in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&amp;nbsp;. The only work around I can think of is to convert the duration to a whole number in terms of total seconds duration.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 00:12:35 GMT</pubDate>
    <dc:creator>d_gosbell</dc:creator>
    <dc:date>2023-10-04T00:12:35Z</dc:date>
    <item>
      <title>How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458131#M31287</link>
      <description>&lt;P&gt;I have Power BI Report Server (May 2023) pulling in data from an ODBC connection. One of the fields is a duration field in the format 00:00:00 (hours, mins, secs). Since the numbers look like a time format (20:21:34) Power BI is converting the field to a time field and displaying 8:21:34 pm. I can't for the life of me figure out how to prevent this from happening. When using a database/odbc connection Power BI doesn't appear to add a step that converts the data. It appears to be doing it internally with no way to remove the step or disable it. I've turned off the obvious settings below and it doesn't seem to make a difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Type Detection" is set to "Never detect column types and headers for unstructured sources"&lt;BR /&gt;"Detect column types and headers for unstructured sources" has been disabled at the file level.&lt;BR /&gt;Time Intelligence has been disabled on the global level and the file level&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 17:42:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458131#M31287</guid>
      <dc:creator>ChrisMajestic</dc:creator>
      <dc:date>2023-10-03T17:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458511#M31291</link>
      <description>&lt;P&gt;Power BI does not have a duration datatype, the only type that supports Hours : Minutes : Seconds is the datetime datatype&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-data-types" target="_blank"&gt;Data types in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&amp;nbsp;. The only work around I can think of is to convert the duration to a whole number in terms of total seconds duration.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 00:12:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458511#M31291</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2023-10-04T00:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458523#M31292</link>
      <description>&lt;P&gt;I forgot to mention that I'm simply trying to get it to import as text. The underlying data is a duration but I'm transforming the data to extract days. The data transformation used to work perfectly before it decided to start converting the data to time format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 00:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458523#M31292</guid>
      <dc:creator>ChrisMajestic</dc:creator>
      <dc:date>2023-10-04T00:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458540#M31295</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/625969"&gt;@ChrisMajestic&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I forgot to mention that I'm simply trying to get it to import as text. The underlying data is a duration&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then you have to add a step doing an explicit cast or conversion to text. Otherwise Power BI will attempt to use the closest compatible data type.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 00:41:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3458540#M31295</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2023-10-04T00:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3459460#M31302</link>
      <description>&lt;P&gt;I tried that but converting it to text doesn't revert the numbers back what they were prior to the transformation. In other words the previous number was 20:21:34 which it converted to 8:21:34 pm. So when I try to convert it to text it keeps it as 8:21:34 pm in text form instead of 20:21:34.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 12:35:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3459460#M31302</guid>
      <dc:creator>ChrisMajestic</dc:creator>
      <dc:date>2023-10-04T12:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3460593#M31311</link>
      <description>&lt;P&gt;So this could also be an issue with type conversion in the ODBC driver. You could try doing the conversion to a string explcitly in a view or SQL query so that it's done by the source database engine.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 23:29:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3460593#M31311</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2023-10-04T23:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3461643#M31321</link>
      <description>&lt;P&gt;Sounds interesting. How do I do that?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:49:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3461643#M31321</guid>
      <dc:creator>ChrisMajestic</dc:creator>
      <dc:date>2023-10-05T12:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent automatic datatype conversion with database connection</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3462669#M31329</link>
      <description>&lt;P&gt;It depends on what sort of database server you are pulling the data from. In SQL Server you could use the CONVERT() function with the optional 3rd parameter to specify the format. The DBA for your source database might be able to help with this.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 22:10:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/How-to-prevent-automatic-datatype-conversion-with-database/m-p/3462669#M31329</guid>
      <dc:creator>d_gosbell</dc:creator>
      <dc:date>2023-10-05T22:10:22Z</dc:date>
    </item>
  </channel>
</rss>

