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
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
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.