March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have the below code who shows in column the results based on the following logic:
This works perfectly with the below code, only when it is the first row (based on the session id) it remains empty because the code can not find a previous result (which makes sense). What I kind of need to do is add a condition to check if the current row is the first row and if so, then show the 'test result'. I'm only not sure how to do this, so hopefully someone can give me some guidance on how to achieve this. Thanks!!
Column =
var _previosid=MAXX(filter('Table','Table'[session]=EARLIER('Table'[session])&& 'Table'[ID]< EARLIER('Table'[ID])),'Table'[ID])
var _review=CALCULATE(MAX('Table'[Review]),FILTER('Table','Table'[ID]=_previosid))
return
SWITCH(TRUE(),'Table'[Test]="Effective" && 'Table'[Review]="Effective","Effective",
'Table'[Test]="Effective" && 'Table'[Review]="Ineffective","Ineffective",
'Table'[Test]="Effective" && 'Table'[Review]="Open",_review)
Solved! Go to Solution.
maybe you can try this
Column =
var _previosid=MAXX(filter('Table','Table'[session]=EARLIER('Table'[session])&& 'Table'[ID]< EARLIER('Table'[ID])),'Table'[ID])
var _review=CALCULATE(MAX('Table'[Review]),FILTER('Table','Table'[ID]=_previosid))
VAR _result=
SWITCH(TRUE(),'Table'[Test]="Effective" && 'Table'[Review]="Effective","Effective",
'Table'[Test]="Effective" && 'Table'[Review]="Ineffective","Ineffective",
'Table'[Test]="Effective" && 'Table'[Review]="Open",_review)
return if (_result="","test result",_result)
Proud to be a Super User!
you are welcome
Proud to be a Super User!
maybe you can try this
Column =
var _previosid=MAXX(filter('Table','Table'[session]=EARLIER('Table'[session])&& 'Table'[ID]< EARLIER('Table'[ID])),'Table'[ID])
var _review=CALCULATE(MAX('Table'[Review]),FILTER('Table','Table'[ID]=_previosid))
VAR _result=
SWITCH(TRUE(),'Table'[Test]="Effective" && 'Table'[Review]="Effective","Effective",
'Table'[Test]="Effective" && 'Table'[Review]="Ineffective","Ineffective",
'Table'[Test]="Effective" && 'Table'[Review]="Open",_review)
return if (_result="","test result",_result)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |