Forum Discussion
Measure rounded to 0 decimals in DirectQuery
- Anonymous1 year ago
UPDATE
I found the issue, is the new Snowflake connector 2.0 (https://learn.microsoft.com/en-us/power-query/connectors/snowflake#new-snowflake-connector-implementation-preview), i'd the connection the next way:
Source = Snowflake.Databases(database, Warehouse, [Implementation="2.0"])
I removed this part [Implementation="2.0"] to use the previous connector and then it works OK.
Thanks for your answers anilelmastasi and grazitti_sapna .
I try the round function on measure and multiply by 1.0, but the result is the same:
In Snowflake the field was defined as NUMBER(18,2), in PowerBI this column is difined as "Decimal", but in DirectQuery we can't change the type to "force it"
I analyse the query that PowerBI made for extract data from Snowflake, PowerBi send this query to Snowflake:
select SUM(cast("VALOR_MERCADO_KONTRAV" as INTEGER)) as "C1"
from
(
select "VALOR_MERCADO_KONTRAV"
from "FACT_SCR_TIPO_CAMBIO"
where cast("ID_FECHA" as DECIMAL) = CAST(20250131 as DECIMAL)
) as "ITBL"
It converts the value to integer, but i don't know why it is doing this transformation. There are anyway to change it the way PowerBI mades this query?