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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
BugmanJ
Helper V
Helper V

DAX Error - OFFSET's parameters were successfully resolved, but argument number 4 was unused.

Good Afternoon All,

What am I trying to do?
Nelson Rule 4, Fourteen or more points in a row alternate in direction, increasing then decreasing.


My Data
Simplistic, one column with index ([Index]), one column with date ([Date]), one column with value ([Valued]). Table is known as "MyData"

Problem
When using the following code, I get the error "OFFSET's parameters were successfully resolved, but argument number 4 was unused"

Code:

NelsonRule4Violation = 
VAR NumPoints = 14
VAR Data = sum('MyData'[Valued])
VAR RowNumber = ROW("Test", sum('MyData'[Valued]))
VAR SwitchCount =
    SUMX (
        FILTER (
            ADDCOLUMNS (
                'MyData',
                "CurrentValue", 'MyData'[Valued],
 "NextValue", IF(RowNumber + NumPoints <= COUNTROWS('MyData'), OFFSET(Data, RowNumber + NumPoints - 1, 0,0,0,0), BLANK())
            ),
            IF (
                ISBLANK([NextValue]),
                0,
                IF (
                    SIGN([NextValue] - [CurrentValue]) <> SIGN([CurrentValue] - OFFSET(Data, RowNumber - 1, 0,0,0,0)),
                    1,
                    0
                )
            ) = 1
        ),
        1
    )
RETURN
    IF (
        SwitchCount >= NumPoints,
        "Out of Control",
        "In Control"
    )


Whats wrong with the code?
 

1 REPLY 1
lbendlin
Super User
Super User

Interesting problem.  Please provide sample data and show expected outcome.

Helpful resources

Announcements
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!

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.