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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
MattKarriker2
Helper II
Helper II

Fixed length decimal data type in Databricks

Good Day Forum

I am in the process of moving our Power BI reporting data sources from Azure Synapse to Azure Dtabricks.  Our models are composite model meaning we have direct query and and in-memory aggregation tables to help support our used experience.  To produce the models we followed Microsofts guidance to convert floating point decimals to fixed length decimals.  This is to reduce the oversize of the model on the in-memory tables.  However to make aggregation awareness work the data types of the direct query columns and the imported aggregate table need to match.  In Synapse this is no issue.  As the query engine can easily convert decimals to money in Synapse.  However there is no money/currency type available in databricks.  Converting the direct query column from floating point decimal to fixed length decimal on databricks sources fail reporing an error with query folding.  The real issue is Power BI is sending a Cast(Field as Money) to databricks and engine does not know how to handel it.  If I leave the direct query fields as floating and change the imported tables to fixed aggregation awareness does not work due to mismatched data types.  
Does anyone have experience converting floating point decimals to fixed length decimals using databricks as the source?  

1 REPLY 1
Gabry
Super User
Super User

Hey @MattKarriker2 ,

I’m not very familiar with Databricks, so I can’t help much with that. However, are you sure that using the currency data type reduces memory footprint? I recall reading articles on SQLBI stating that currency  and decimal  both use 8 bytes.
Here I found the article https://www.sqlbi.com/articles/choosing-numeric-data-types-in-dax/

 

Have you tested the performance without converting the numbers?

EDIT: Oh, I just noticed this thread is from 2023, never mind! 😅

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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