Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hey!
I am trying to make a new Column (NewColumn) or Measure, where it uses the state of the row before, for example:
Time Duration(s) State NewColumn (ActualState) Index
2014 150 Operational Operational 1'
2014 150 Operational Operational 2
2014 150 Operational Operational 3
2014 150 Operational Operational 4
2014 1 Indeterminate Operational 5
2014 150 Operational Operational 6
2014 150 Operational Operational 7
For example I want and IF Function, if the duration of tim is less then 4 seconds then use the State of Previous Index, so I want a new Column called ActualState as can be seen. I have tried many different DAX functions but cant make anybody work.
Here are some thoughts: (havent made anything work)
ActualState =
var CurrentIndex = Utilizations[Index2] -1
VAR UtilizationsState2 = Utilizations[State] of the index "CurrentIndex"??
return
IF(Utilizations[Duration_s]>4,Utilizations[State],
IF(Utilizations[Duration_s]<=4, UtilizationsState2 ))
ActualState =
var CurrentIndex= MAX(Utilizations[Index2])
var UtilizationsState2 =Utilizations[State] in CurrentIndex-1
return
IF(Utilizations[Duration_s]>4,Utilizations[State],
IF(Utilizations[Duration_s]<=4, UtilizationsState2))
ActualState2 =
FILTER(Utilizations,EARLIER((Utilizations[Index2]-1)))
Helpful for help,
Kind regards
Solved! Go to Solution.
@Anonymous Please try this as a "New Column"
NewState = VAR _PrevVal = LOOKUPVALUE(Test65PrevRow[State],Test61AbNormalDiff[Index],Test65PrevRow[Index]-1) RETURN IF(Test65PrevRow[Duration]<4,_PrevVal,Test65PrevRow[State])
Proud to be a PBI Community Champion
@Anonymous Please try this as a "New Column"
NewState = VAR _PrevVal = LOOKUPVALUE(Test65PrevRow[State],Test61AbNormalDiff[Index],Test65PrevRow[Index]-1) RETURN IF(Test65PrevRow[Duration]<4,_PrevVal,Test65PrevRow[State])
Proud to be a PBI Community Champion
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
104 | |
93 | |
83 | |
64 |