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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

undefined

Hi there,

 

I have an error occuring when visualizing following quickmeasure in a table + the error is "input[x]: the value "undef." of type text is not convertable to type number. Here is the formula:

 

IF(ABS(

IFERROR(

CALCULATE(SUM('input'[X1]) / SUM('input'[Y1]) - IFERROR(SUM('input'[X2]) / SUM('input'[Y2]),0), FILTER(input,'input'[Date]=MAX('Date 1'[Date 1])))

-

CALCULATE(SUM('input'[X1]) / SUM('input'[Y1]) - IFERROR(SUM('input'[X2]) / SUM('input'[Y2]),0), FILTER(input,'input'[Date]=MAX('Date 2'[Date 2]))),

"undef."))>100,"undef.",

IFERROR(

CALCULATE(SUM('input'[X1]) / SUM('input'[Y1]) - IFERROR(SUM('input'[X2]) / SUM('input'[Y2]),0), FILTER(input,'input'[Date]=MAX('Date 1'[Date 1])))

-

CALCULATE(SUM('input'[X1]) / SUM('input'[Y1]) - IFERROR(SUM('input'[X2]) / SUM('input'[Y2]),0), FILTER(input,'input'[Date]=MAX('Date 2'[Date 2]))),

"undef."))

 

x1, x2, y1, and y2 are all figures [-500; 500]

 

Thanks in advance!

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous for divide use divide function and then try , not need to check is error after that

example

divide(SUM('input'[X2]) ,SUM('input'[Y2]) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

You can also use variables to reduce redundancy. For example:

VAR _1 =
    CALCULATE (
        DIVIDE ( SUM ( 'input'[X1] ), SUM ( 'input'[Y1] ) ) -
        DIVIDE ( SUM ( 'input'[X2] ), SUM ( 'input'[Y2] ) ),
        FILTER ( input, 'input'[Date] = MAX ( 'Date 1'[Date 1] ) )
    )
VAR _2 =
    CALCULATE (
        DIVIDE ( SUM ( 'input'[X1] ), SUM ( 'input'[Y1] ) ) -
        DIVIDE ( SUM ( 'input'[X2] ), SUM ( 'input'[Y2] ) ),
        FILTER ( input, 'input'[Date] = MAX ( 'Date 2'[Date 2] ) )
    )
RETURN
    IF ( ABS ( _1 - _2 ) > 100, "undef.", _1 - _2 )

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.