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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
sckienle
Advocate II
Advocate II

Numeric Filtering Fails on Some Values

I have a problem with filtering numeric values.

 

I have a database table that defines a column as NUMERIC(18,1).  I try to filter this column to only the value 9.3 and the created query rounds that 9.3 number very poorly to return no values.  The filter in Power BI is:

 

Table.SelectRows(curriculum_db_course, each ([icoursemasterid] = 9.3))

 

in the SQL query this becomes: 

 

"_"."icoursemasterid" = 9.300000000000001E+000

 

9.3 is not the same as 9.300000000000001 obviously, so the database returns no rows. I tried changing the filter to explicity round the 9.3 number, Number.Round(9.3, 1), but this does not effect the generated SQL.

 

I can get around this by changing the type of the column in Power BI to a Fixed Decimal Number, which stops the query folding with the side effect of forcing Power BI to do more effort in processing the data.  I can also force this work around by changing the filter to:

 

Table.SelectRows(curriculum_db_course, each (Currency.From([icoursemasterid]) = 9.3))

 

But again this forces the evaluation into Power BI rather than passing it on to the SQL.

 

This is a simplified example, the real issue is being caused by larger use of buffered lists to filter data so the impact of having to change data types will become even more impactive on overall refresh performance.

 

Is there a query rollup acceptable way to address this problem?

2 REPLIES 2
DataInsights
Super User
Super User

@sckienle,

 

Have you tried custom SQL? That would ensure the query is sent to the database exactly as you define it.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I try to avoid custom SQL unless necessary for performance.  I did get around this by recreating the process with a join rather than a more efficient buffered list / List.Contains option.  Would have been easier to have Power BI handle numbers correctly....

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.