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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Justas4478
Post Prodigy
Post Prodigy

Removing decimals from values while keeping for totals

Hi, I have table that has some counts.
However I cant find a way how I could remove delimal points from values in red square while keeping decimal points for values in green square.
I tried couple options but that did not seam to work for me.
Does anyone know any solution if that is even possible?

Justas4478_0-1734431487172.png

 

1 ACCEPTED SOLUTION

Unfortunately, with live connection, you will need to apply the dynamic format string to the measure in the semantic model itself. Alternatively, you can create another measure that returns a formatted text instead

IF (
    NOT ( HASONEVALUE ( Geo[Geo] ) ),
    FORMAT ( [my measure], "#,#.00" ),
    FORMAT ( [my measure], "#,#" )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

10 REPLIES 10
danextian
Super User
Super User

Hi @Justas4478 

 

Apply dynamic format string to the measure being used in the viz. In the screenshot below, "#,#.00" is being applied to the column total wherein geo has no single value (as it has multiple at the total which are the indivdual geos) otherwise, "#,#".

danextian_0-1734432916273.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian I tried your solution as well, but same problem it requires column while I can only provide measure.

Justas4478_0-1734434062258.png

 

Apply dynamic format string to a measure but reference the column in your formula. You are referencing the measure the string is to be applied to and not to the dates.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian I quickly looked in to and it seasm I cant create dinamic format since it is on for model measures and not ones using live connection.

Justas4478_0-1734435889451.png

 

Unfortunately, with live connection, you will need to apply the dynamic format string to the measure in the semantic model itself. Alternatively, you can create another measure that returns a formatted text instead

IF (
    NOT ( HASONEVALUE ( Geo[Geo] ) ),
    FORMAT ( [my measure], "#,#.00" ),
    FORMAT ( [my measure], "#,#" )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian It works thanks for the solution.
To bad that it doubles refresh time.

Justas4478_0-1734436555107.png

But I guess this is only option I have.

saud968
Super User
Super User

Unfortunately, directly removing decimal points from specific cells while keeping them for others within a single table visual in Power BI Desktop isn't possible.

However, here are a couple of effective workarounds to achieve the desired result:

1. Conditional Formatting:

Create a Measure:
Write a measure to determine if a value is a total or a detail value. For example:


IsTotal = IF(
HASONEVALUE('YourTableName'[YourGroupingColumn]),
FALSE,
TRUE
)
Apply Conditional Formatting:
Select the visual where you want to apply the formatting.
Go to the Format pane.
Under Conditional formatting, create a new rule.
Set the rule to format values where IsTotal is TRUE.
In the Format pane for the rule, set the number format to "Number" with zero decimal places.
2. Create a Separate Visual:

Create a New Visual:
Add a new visual (e.g., table or matrix) to your report.
Use the same data as the original visual, but filter it to only show the total values.
Apply the desired formatting (zero decimal places) to the total values in this new visual.
Position the Visuals:
Position the two visuals side by side or one below the other, aligning them to create a seamless appearance.

Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

@saud968 The measure you provide requires column while I am using measure as my data.
Here is measure:

Dispatch average =
AVERAGEX(
    KEEPFILTERS(VALUES('Date'[Week Start Date])),
    CALCULATE('Stock Movement'[Dispatch count])
)

Is there way to change where I can use measure?

Try a possible approach using a calculated column:

Create a Calculated Column:

Add a new calculated column to your 'Date' table:

IsTotal = IF(
HASONEVALUE('Date'[Week Start Date]),
FALSE,
TRUE
)
Modify Your Measure:

Modify your Dispatch average measure to incorporate the IsTotal column:

Dispatch average =
IF(
MAX('Date'[IsTotal]),
FORMAT(
AVERAGEX(
KEEPFILTERS(VALUES('Date'[Week Start Date])),
CALCULATE('Stock Movement'[Dispatch count])
),
"0"
),
AVERAGEX(
KEEPFILTERS(VALUES('Date'[Week Start Date])),
CALCULATE('Stock Movement'[Dispatch count])
)
)
This modified measure will format the total value as an integer and display the detail values with decimal places.

Alternative Approach Using a Second Measure:

Create a Second Measure:

Create a new measure to calculate the formatted total:

Formatted Total Dispatch =
FORMAT(
AVERAGEX(
KEEPFILTERS(VALUES('Date'[Week Start Date])),
CALCULATE('Stock Movement'[Dispatch count])
),
"0"
)
Use the Measures in Your Visual:

In your table or matrix visual, use the Dispatch average measure for the detail rows and the Formatted Total Dispatch measure for the total row.

Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

@saud968Unfortunatelly since company uses live connection method.
I am limited to only being able to create measures.
So I cant do any calculated columns.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors