Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Measure rounded to 0 decimals in DirectQuery

Hello,

I have a hybrid dataset connected to Snowflake via DirectQuery for Fact tables and import for dimension tables.

I've created a measure with SUM, but when i visualize it the decimals are rounding to 0, but the field from table is OK, it shows correctly decimals:

Screenshot 2025-04-30 103814.png

I need the decimal part on measure. Anyone have idea for right it?

 

Thanks in advance.

 

Regards,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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-implement...), 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.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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-implement...), 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.

Anonymous
Not applicable

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:

Screenshot 2025-04-30 112806.png

 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"

Screenshot 2025-04-30 114123.png

 

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?

 

grazitti_sapna
Super User
Super User

Hi @Anonymous ,
Please use the below measure to achieve the desirable output. 

15.2 Valor Mercado Contravalorado =
ROUND(SUM(FACT_SCR_TIPO_CAMBIO[VALOR_MERCADO_KONTRAV]), 2)

If the issue is still unresolved, check the column-level formatting for VALOR_MERCADO_KONTRAV in your data model:

  • Is it defined as Fixed Decimal Number or Whole Number in Snowflake?

  • Sometimes, DirectQuery doesn't recognize precision unless explicitly defined in the source.

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.

💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.

🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.

🔗 Curious to explore more? [Discover here].

Let’s keep building smarter solutions together!

 

anilelmastasi
Super User
Super User

Hello @Anonymous ,

 

You can create a new measure, like this= ROUND(SUM('FactTable'[Amount]), 2)

 

Or  you can multiply with "1.0"

 

 

If this solved your issue, please mark it as the accepted solution.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors