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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
diogovaz
Frequent Visitor

Decimal Values

Hi guys,

 

I have a power bi project that is connect to Redshift Database via DirectQuery.

When I'm in Edit Query I saw this:

Captura de ecrã 2018-04-16, às 14.34.55.png

 

But when I'm building my report this is what appears:

Captura de ecrã 2018-04-16, às 14.37.28.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The decimal numbers are not appear. Can you help me on this?

 

Thanks

1 ACCEPTED SOLUTION
diogovaz
Frequent Visitor

Resolved!

 

Edit Query - Right Click on variable - Transform - Absolute Value

 

Captura de ecrã 2018-04-16, às 16.53.27.png

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hello,

 

I stumbled upon the same issue when working with Power BI and Redshift. diego's solution works as described but only if you work with positive values; a better unexpected solution is to use the Power Query editor in Power BI and apply a Standard Transformation to the column such as Multiplying the value by one or adding 0 to the value.

 

The standard query without the transformation casts the return value as decimal which in Redshift defaults to using 0 decimal values:

select sum(CAST("mov_div_amount" AS DECIMAL ) ) as "C1" from ( select "mov_div_amount" from "main"."public"."facmovementdivision" where "mov_div_date" >= TIMESTAMP '2018-12-31 00:00:01') as "ITBL"

After the suggested transformation is applied, the query instead returns a double and looks like the following:

select sum("C1") as "C1" from ( select CAST("mov_div_amount" AS DOUBLE PRECISION ) * CAST(1 as float8) as "C1" from "main"."public"."facmovementdivision" where "mov_div_date" >= TIMESTAMP '2018-12-31 00:00:01') as "ITBL"

This solution is viable when working with two decimals or less because the default precision for double in Redshift is 2. The ideal solution would be for the Power BI Redshift connector to avoid this cast when using numeric/decimal fields.

 

Here's an image of two visuals comparing the same value before and after the suggested transformation:

Captura.JPG

 

 

 

 

 

 

 

I hope this helps!

diogovaz
Frequent Visitor

Resolved!

 

Edit Query - Right Click on variable - Transform - Absolute Value

 

Captura de ecrã 2018-04-16, às 16.53.27.png

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors