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
mdb86
Regular Visitor

Issue with Rounding in DAX Formula Result

Hello, I have an issue with rounding a number. It concerns the Pr. field (DAX measure).
Even if I set the detail to the sixth decimal place, the rounding stops at the fourth, adding "00" at the end. 
In your opinion, how can I resolve this? I have obviously tried adding Round in the formula. 
prezzo00.png
 
8 REPLIES 8
mdb86
Regular Visitor

I understand your point. It's hard to understand the logic outside power Bi. I'd like to share an example but I don't know how to do, can you help me, this way it would be easier for the comunity to check the formulas.
Thank you very much

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

mdb86
Regular Visitor

does the link work?

Yes, but you provided way too much data. Try to focus on just the issue, remove anything that is unrelated.

 

I can't see what's wrong 

lbendlin_1-1725494500450.png

 

 

 

I noticed you have other round guidelines in place.

 

lbendlin_0-1725494475026.png

 

lbendlin
Super User
Super User

Please show the formula.

Pr. = divide([ValoreEsistenza],[Esistenza])

 

ValoreEsistenza =

 sumx(SUMMARIZE(values(DIM_ART),DIM_ART[CodgrpFis],

                "Esisten", [Esistenza],

           "PrezzoAc", [PrezzomAc]),

    [Esisten]*[PrezzoAc])

 

Esistenza = VAR entrate= CALCULATE(sum(BODY[Qtàsegno]),

                                    BODY[Segno]="ENTRATE"

                                )

           VAR uscite= CALCULATE(sum(BODY[Qtàsegno]),

                                    BODY[Segno]="USCITE"

                                )

            VAR esist = 'MIS-MAG'[Inventario]+entrate+uscite

           RETURN

    ROUND(esist,2)

 

PrezzomAc = divide(

                    sum(BODY[ValC]),sum(BODY[QtC]

                    ))

 

Inventario = CALCULATE(sum(BODY[Qtàsegno]),

                                    BODY[Segno]="INVENTARIO")

Entrate = CALCULATE(sum(BODY[Qtàsegno]),

                                    BODY[Segno]="ENTRATE"

                                )

Uscite = CALCULATE(sum(BODY[Qtàsegno]),

                                    BODY[Segno]="USCITE"

                                )

I would guess that  ROUND(esist,2)  plays a role.  But maybe you want to spend some time refactoring that query. It seems to be rather complex.

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.

60 days of Data Days Carousel

Data Days 2026

Join Fabric 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.