Search code examples
powerbisnowflake-cloud-data-platformsnowflake-connector

PowerBI snowflake connector incorrectly uses ',' as decimal separator


When using the SnowFlake connector for PowerBI, the Snowflake sql query is not correctly generated by PowerBI. It is generated with a ',' as decimal separator instead of '.'

I have a snowflake table which contains (among others):

  1. Timestamps : ENQUEUEDTIMEUTC
  2. Beer Temperatures : BEER_TEMPERATURE

I try to display the moment corresponding to the highest beer temperature. When more than one moment exists, I want the earliest moment.

What I do:

  • card visualization of ENQUEUEDTIME
  • Filter on visual : Top N filter --> top 1 of BEER_TEMPERATURE

What goes wrong:

When generating this query, PowerBI incorrectly passes a ',' to represent the value. The query becomes:

from "<my warehouse>"."<my schema>"."<my table>"
        where "BEER_TEMPERATURE" = CAST(15,826941 as DOUBLE) ...

enter image description here

This query seems to fail on the ','. It produces the following error message:

SQL compilation error: syntax error line 19 at position 42 unexpected ','. syntax error line 19 at position 43 unexpected '826941'. syntax error line 19 at position 59 unexpected ')'.

The value of 15.83 is the correct value for the beer temperature.

How can I change ',' to '.' in the query PowerBI sends to snowflake?


Solution

  • In Power BI Desktop go to File -> Options and settings -> Options
    Here you have two settings that affect what separator you have, the first is in CURRENT FILE -> Regional Settings:

    enter image description here

    and the second GLOBAL -> Regional Settings:

    enter image description here