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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Need to show values within range to one decimal point and those outside range no decimal

I'm having problems with a DAX measure, I need the displayed values in a table to show one decimal point if they are within the range -999 to 999. If they are outside of this range on either side then I don't want them to show a decimal value.

This is what I'm currently using : 

Total in Thousands + Brackets Decimal =
VAR TotalValue = SUM(vPowerBI_ManufactuerDebt[total])
RETURN
IF(
    ABS(TotalValue) < 1000,
    FORMAT(TotalValue, "£#,0.0,K"),  
    IF(
        TotalValue < -1000,
        FORMAT(TotalValue, "(£#,0,K)"),  
        FORMAT(TotalValue, "£#,0,K")     
    )
)
3 REPLIES 3
Anonymous
Not applicable

Hi, @Anonymous 

I create a table:

vyohuamsft_1-1719197913456.png

 

Then create a new measure and try the following DAX:

Total in Thousands + Brackets Decimal = 
VAR TotalValue = SUM('Table'[total])
RETURN
IF(
    ABS(TotalValue) >= 1000,
    FORMAT(TotalValue, "£#,0,K"),  
    FORMAT(TotalValue, "£#,0.0,K")     
)

Here is my preview:

vyohuamsft_0-1719197891522.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thankyou for your reply. I have noticed that there is also an error in the way that minus values are displaying from this measure in both my data and the data from your example. The value of -990.50 should be displayed as -1K and not -990.5K as this would give the impression of the value being -990,500.

 

I'm getting the same result in my data, how can I change the measure to stop this from happening? 

ajohnso2
Super User
Super User

Because your outer IF is evaluating ABS() <1000 your inner if will never get evaluated.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.