Forum Discussion
MClipsham92
7 years agoFrequent Visitor
Specifying a Row using two columns
Hi All, Apologies if the title wasn't very clear I was having trouble thinking of how to word it. I have some survey data from students from multiple points in a programme. Each survey the st...
- 7 years ago
Hope I understand your requirement clearly. Thanks.
Column = VAR a= if(Sheet3[attribute]="listening end of week 12",MAXX(FILTER(Sheet3,Sheet3[student]=EARLIER(Sheet3[student])&&Sheet3[attribute]="resilience start of programme"),Sheet3[score])) return if(ISBLANK(a),BLANK(),if(Sheet3[score]<a,"Did not improve","Improved"))
ryan_mayu
7 years agoSuper User
Hope I understand your requirement clearly. Thanks.
Column = VAR a= if(Sheet3[attribute]="listening end of week 12",MAXX(FILTER(Sheet3,Sheet3[student]=EARLIER(Sheet3[student])&&Sheet3[attribute]="resilience start of programme"),Sheet3[score])) return if(ISBLANK(a),BLANK(),if(Sheet3[score]<a,"Did not improve","Improved"))
MClipsham92
7 years agoFrequent Visitor
I've no idea how I'd go about writing that myself but it seems to have worked with a tiny bit of tweaking, I've ended up with this:
Listening Improved Term 1 = VAR a= IF(Instructor[Attribute]="listening End of Week 12",MAXX(FILTER(Instructor,Instructor[Name.1]=EARLIER(Instructor[Name.1])&&Instructor[Attribute]="Listening Start of Programme"),Instructor[Score])) return if(ISBLANK(a),BLANK(),if(Instructor[Score]<a,"Did not improve","Improved"))
This works well but how would I go about adding in a "Stayed the same" result if the score are the same? (currently counting as "Improved". Is it a case of editing the if statement at the end?
Also an explanation of how it works so I could to learn to write similar myself in the future would be amazing, or maybe a link to an article discussing it?
Thanks!
- ryan_mayu7 years agoSuper User
if(ISBLANK(a),BLANK(),if(Instructor[Score]<a,"Did not improve",if(score=a,"Stay the same","Improved"))
You can add another if statement in the place I highlighted in red.
I think the key point is about Earlier formular.
https://docs.microsoft.com/en-us/previous-versions/ff452135(v=technet.10)
Thanks and BR
Ryan