Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 15 | |
| 8 | |
| 8 | |
| 8 |