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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Why is this calculated column not calculating the output properly?

I created a calculated column with this DAX code and got the below output: 

 

CL OOL = 
SWITCH (
    TRUE (),
    AND (
        IFERROR ( INT ( Panel_1[Value] ), "Not Running" ) >= Panel_1[Min],
        IFERROR ( INT ( Panel_1[Value] ), "Not Running" ) <= Panel_1[Max]
    )
        || Panel_1[Index] IN { 91, 92, 93, 94, 95, 96, 97, 98 }, "In Limits",
    IFERROR ( INT ( Panel_1[Value] ), "Not Running" ) = "Not Running", "Not Running",
    "OOL"
)

 

The CL OOL column should show In limits if the Value column is between min/max and OOL if it is outside the min/max range. If the Value is "NA" then it should output Not Running. Some of the indexes, e.g. 91/92/93 should always display In Limits. In the picture below, 0.979 is clearly between 0.90 and 1.03 so why is it OOL?

 

 

XYZ1233_0-1647005121199.png

 

1 ACCEPTED SOLUTION

Replace INT with VALUE, that will try and convert it to a decimal number

View solution in original post

3 REPLIES 3
johnt75
Super User
Super User

The INT function rounds a number down to the nearest integer, which for 0.979 is 0.

I'd suggest changing the column types for min, max and value to be a decimal number and use BLANK() to indicate that it is not running.

Anonymous
Not applicable

Hi @johnt75, The data type for min/max is already decimal. The value column has type text as some of the rows have "NA" as an output. Is there a way I can stop it rounding down to the nearest integer?Should I replace the INT function with something else. Cheers

Replace INT with VALUE, that will try and convert it to a decimal number

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors