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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DOLLARFR Function not converting to whole numbers

I am pretty much a Power BI newbie, exploring and figuring things out as I go along. I have a measure which uses the DOLLARFR function to represent data as a fractional notation - in this case thirds. This works amazingly in general but on occasion it fails to convert 3 thirds into a whole number i.e. data shows up as 5.3 (5 and 3 thirds) instead of 6?

 

I have a column [OutCount] populated with count data and divided by 3 so that a decimal value is available and each "count" is 0.3333...

 

I then have the following measure to sum that decimal data and convert into fractional notations:

Fraction = DOLLARFR(sum('Table'[OutCount]),3)
 
This gives the following outputs - representing the decimals as fractions (in this case thirds):
6.667 = 6.2
1.667 = 1.2
5.333 = 5.1
0.333 = 0.1
 
In most cases this presents the correct data in my dashboard. But in certain instances it does not. For example:
6.000 is presented as 5.3. Which is technically correct (5 and 3 thirds), but should be presented as 6.0.
 
Does anyone know why this is happening or what I may need to do differently?
 
Thanks in advance

 

 

 

2 REPLIES 2
d_gosbell
Super User
Super User

This looks like it's probably a rounding issue, I suspect the 5.3 is actually just under 5.3 by a version small fraction. See the following test data:

 

d_gosbell_0-1608523294001.png

 

CheenuSing
Community Champion
Community Champion

Hi @Anonymous 

 

I tested the measure Fraction. It is working perfectly.  When I use DOLLARFR(6.000,3) it gives me 6.0

 

My guess is the sum(sum('Table'[OutCount]) is evaluating to 5.999 which when used with the Fraction measure it evaluates to 5.3.

 

See if you can round the SUM(Table(Count) ) before passing it to Fraction measure.

 

Cheers

 

CheenuSing

 

 

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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