Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |