Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
Interesting problem. Please provide sample data and show expected outcome.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |