-
Notifications
You must be signed in to change notification settings - Fork 0
/
District_Wide_Surveys_LoadVars.qvs
1380 lines (1233 loc) · 191 KB
/
District_Wide_Surveys_LoadVars.qvs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Loading Variables: District Wide Surveys
* Jonathan Vitale
* Changes:
*
* Version 1.0.5.1:
* - The counts for the focus questions include non score responses (but not skips)
*
* Reminders:
* - All the let statements will be strings, if you want an actual single quote in the string, use '&chr(39)&'
* - Alternatively, you can use double-quotes in set analyses, but these enable search and wildcards, so be careful.
* - A $(somevar) tells click to substitute whatever is somevar immediately. If you want to prevent this expansion replace $ with '&chr(36)&'
* - Similarly $(=$(somevar)) tells Qlik to evaluate the somevar expression, if you do not want this done in the load script replace both $ with chr(36)
**/
set vVersionNumber = '1.0.5.1';
///// What is the latest year?
let vMaxYearEnd = 'Max(YearEnd)';
let vLastYearEnd = '(Max(YearEnd)-1)';
let vLastLastYearEnd = '(Max(YearEnd)-2)';
let vMaxYear = '(max(left(year,4))) & ' &chr(39)& chr(45) &chr(39)& ' & (max(right(year,4)))';
let vLastYear = '(max(left(year,4))-1) & ' &chr(39)& chr(45) &chr(39)& ' & (max(right(year,4))-1)';
let vLastLastYear = '(max(left(year,4))-2) & ' &chr(39)& chr(45) &chr(39)& ' & (max(right(year,4))-2)';
///// what is the minimum number of individuals and percent of respondents for an analysis
let vMinStudents = 25;
let vMinParents = 25;
let vMinTeachers = 5;
let vMinPrincipals = 5;
/// for now we are not using the following
let vMinStudentsPerc = 0;
let vMinParentsPerc = 0;
let vMinTeachersPerc = 0;
let vMinPrincipalsPerc = 0;
///// Response Rate
//// Master Measure vmmCount_Responded_Student_Current: Count of Students in current year - for use in sizing points in the scatter plot
let vmmCount_Responded_Student_Current = 'Count({$<surveyTypeForDisplay = {"Student"}, responded={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}
>} responded)';
//// Text for subtitle in Response Rate KPIs
let vSubTitle_RespondedKPI_Student = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Student Responses: '&chr(39)&' &
Num(Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, surveyTypeForDisplay={"Student"}, responded={1}>} respondentid),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_RespondedKPI_Parent = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Parent Responses: '&chr(39)&' &
Num(Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, surveyTypeForDisplay={"Parent"}, responded={1}>} respondentid),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_RespondedKPI_Teacher = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Teacher Responses: '&chr(39)&' &
Num(Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, surveyTypeForDisplay={"Teacher"}, responded={1}>} respondentid),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_RespondedKPI_Principal = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Principal Responses: '&chr(39)&' &
Num(Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, surveyTypeForDisplay={"Principal"}, responded={1}>} [School Name (ULCS)]),
'&chr(39)&'#,##0'&chr(39)&')';
//// Numerator - count of respondents
/// Master Measure: vmmCount_Responded_Student: How many students (or other) responded to the survey?
// Note, these don't take sample size into account, but if they do here is a sample of how:
// If( $(vMinParents) <= count({$<surveyTypeForDisplay = {'Parent'} , year=, responded={'1'}>} responded) and $(vMinParentsPerc) <= count({$<surveyTypeForDisplay = {'Parent'} , year=, responded={'1'}>} responded) / count({$<surveyTypeForDisplay = {'Parent'} , year= , inEnrollmentCounter={1}>} responded)
let vmmCount_Responded_Student = 'Num(Sum({$<surveyTypeForDisplay = {"Student"}, year= >} responded), '&chr(39)&'#,##0'&chr(39)&')';
let vmmCount_Responded_Parent = 'Num(Sum({$<surveyTypeForDisplay = {"Parent"}, year= >} responded), '&chr(39)&'#,##0'&chr(39)&')';
let vmmCount_Responded_Teacher = 'Num(Sum({$<surveyTypeForDisplay = {"Teacher"}, year= >} responded),'&chr(39)&'#,##0'&chr(39)&')';
// Principal is a little different because we are counting distinct schools
let vmmCount_Responded_Principal = 'Num(Count(distinct {$<surveyTypeForDisplay = {"Principal"}, year=, responded={1} >} [School Name (ULCS)]), '&chr(39)&'#,##0'&chr(39)&')';
//// Denominator - total # in respective groups
/// Master Measure: vmmCount_Student - the number of students in grades 3 - 12
let vmmCount_Student = 'Num(Count({$<surveyTypeForDisplay = {"Student"}, year=, inEnrollmentCounter={1},
grade -= {"00", "01", "02"}>} responded), '&chr(39)&'#,##0'&chr(39)&')';
let vmmCount_Parent = 'Num(Count({$<surveyTypeForDisplay = {"Parent"}, year=, inEnrollmentCounter={1}>} responded), '&chr(39)&'#,##0'&chr(39)&')';
let vmmCount_Teacher = 'Num(Count({$<surveyTypeForDisplay = {"Teacher"}, year= >} responded), '&chr(39)&'#,##0'&chr(39)&')';
// Principal is a little different because we are counting distinct schools
let vmmCount_Principal = 'Num(Count(distinct {$<year= >} [School Name (ULCS)]), '&chr(39)&'#,##0'&chr(39)&')';
//// Rate - Numerator / Denominator for current year
let vmmRatio_Responded_by_Total_Student_Current = 'Num(Sum({$<surveyTypeForDisplay = {"Student"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Student"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))},
grade -= {"00", "01", "02"}
>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Parent_Current = 'Num(Sum({$<surveyTypeForDisplay = {"Parent"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Parent"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Teacher_Current = 'Num(Sum({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Principal_Current = 'Num(Count(distinct {$<surveyTypeForDisplay = {"Principal"}, responded={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} [School Name (ULCS)]) /
Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>} [School Name (ULCS)]), '&chr(39)&'#.#%'&chr(39)&')';
//// Year over year
let vmmRatio_Responded_by_Total_Student_YOY = 'Num(
Sum({$<surveyTypeForDisplay = {"Student"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Student"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))},
grade -= {"00", "01", "02"}
>} responded)
-
Sum({$<surveyTypeForDisplay = {"Student"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Student"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))},
grade -= {"00", "01", "02"}
>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Parent_YOY = 'Num(
Sum({$<surveyTypeForDisplay = {"Parent"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Parent"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}
>} responded)
-
Sum({$<surveyTypeForDisplay = {"Parent"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Parent"}, inEnrollmentCounter={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}
>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Teacher_YOY = 'Num(
Sum({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}
>} responded)
-
Sum({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))} >} responded) /
Count({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}
>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Principal_YOY = 'Num(
Count(distinct {$<surveyTypeForDisplay = {"Principal"}, responded={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} [School Name (ULCS)]) /
Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>} [School Name (ULCS)])
-
Count(distinct {$<surveyTypeForDisplay = {"Principal"}, responded={1},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))} >} [School Name (ULCS)]) /
Count(distinct {$<YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>} [School Name (ULCS)]), '&chr(39)&'#.#%'&chr(39)&')';
//// Rate - Numerator / Denominator for all years
let vmmRatio_Responded_by_Total_Student_AllYears = 'Num(Sum({$<surveyTypeForDisplay = {"Student"},
YearEnd = >} responded) /
Count({$<surveyTypeForDisplay = {"Student"}, inEnrollmentCounter={1},
grade -= {"00", "01", "02"}, YearEnd =
>} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Parent_AllYears = 'Num(Sum({$<surveyTypeForDisplay = {"Parent"},
YearEnd = >} responded) /
Count({$<surveyTypeForDisplay = {"Parent"}, inEnrollmentCounter={1},
YearEnd = >} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Teacher_AllYears = 'Num(Sum({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = >} responded) /
Count({$<surveyTypeForDisplay = {"Teacher"},
YearEnd = >} responded), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Responded_by_Total_Principal_AllYears = 'Num(Count(distinct {$<surveyTypeForDisplay = {"Principal"}, responded={1},
YearEnd = >} [School Name (ULCS)]) /
Count(distinct {$<YearEnd = >} [School Name (ULCS)]), '&chr(39)&'#.#%'&chr(39)&')';
///// Survey Focus Questions - Percent Most Positive
//// Question codes
let vStudentQuestionCode1 = chr(39)& 'STUDENT|Q3f' & chr(39);
let vStudentQuestionCode2 = chr(39)& 'STUDENT|Q1b' & chr(39);
let vStudentQuestionCode3 = chr(39)& 'STUDENT|Q3k' & chr(39);
let vStudentQuestionCode4 = chr(39)& 'STUDENT|Q3a' & chr(39);
let vParentQuestionCode1 = chr(39)& 'PARENT|Q7f' & chr(39);
let vParentQuestionCode2 = chr(39)& 'PARENT|Q7a' & chr(39);
let vParentQuestionCode3 = chr(39)& 'PARENT|Q7d' & chr(39);
let vParentQuestionCode4 = chr(39)& 'PARENT|Q3g' & chr(39);
let vTeacherQuestionCode1 = chr(39)& 'TEACHER|Q5a' & chr(39);
let vTeacherQuestionCode2 = chr(39)& 'TEACHER|Q3e' & chr(39);
let vTeacherQuestionCode3 = chr(39)& 'TEACHER|Q3i' & chr(39);
let vTeacherQuestionCode4 = chr(39)& 'TEACHER|Q4e' & chr(39);
//// Question text (originally I was figuring this out by code, but this will make it faster)
let vStudentQuestion1 = 'I enjoy being in school.';
let vStudentQuestion2 = 'My teachers have high expectations for me in school.';
let vStudentQuestion3 = 'My school is clean.';
let vStudentQuestion4 = 'I am bullied at school.';
let vParentQuestion1 = 'I am pleased with the quality of education my child'&chr(39)&'s school is providing for my child.';
let vParentQuestion2 = 'My child'&chr(39)&'s school has high expectations for my child'&chr(39)&'s learning.';
let vParentQuestion3 = 'Teachers at my child'&chr(39)&'s school encourage my child to work hard.';
let vParentQuestion4 = 'My child feels safe at school.';
let vTeacherQuestion1 = 'The principal communicates a clear mission for our school.';
let vTeacherQuestion2 = 'My students are motivated to learn.';
let vTeacherQuestion3 = 'My students influence decisions regarding learning activities.';
let vTeacherQuestion4 = 'My students are more focused on grades than learning.';
//// Question abbreviation
let vStudentQuestion1Abbr = 'I enjoy being in school';
let vStudentQuestion2Abbr = 'My teachers have high expectations';
let vStudentQuestion3Abbr = 'My school is clean';
let vStudentQuestion4Abbr = 'I am bullied';
let vParentQuestion1Abbr = 'Pleased with quality of education';
let vParentQuestion2Abbr = 'Teachers have high expectations';
let vParentQuestion3Abbr = 'Teachers encourage hard work';
let vParentQuestion4Abbr = 'My child feels safe';
let vTeacherQuestion1Abbr = 'Clear mission by principal';
let vTeacherQuestion2Abbr = 'My students are motivated';
let vTeacherQuestion3Abbr = 'Students influence decisions';
let vTeacherQuestion4Abbr = 'Students focus on grades over learning';
//// Question best "most positive" responses
let vStudentQuestion1MostPositive = 'Most or all the time';
let vStudentQuestion2MostPositive = 'Most or all the time';
let vStudentQuestion3MostPositive = 'Most or all the time';
let vStudentQuestion4MostPositive = 'Never';
let vParentQuestion1MostPositive = 'Strongly Agree';
let vParentQuestion2MostPositive = 'Strongly Agree';
let vParentQuestion3MostPositive = 'Strongly Agree';
let vParentQuestion4MostPositive = 'Most or all the time';
let vTeacherQuestion1MostPositive = 'Strongly Agree';
let vTeacherQuestion2MostPositive = 'Most or all the time';
let vTeacherQuestion3MostPositive = 'Most or all the time';
let vTeacherQuestion4MostPositive = 'Never';
//// Current Count
let vCount_Student_Q1_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q2_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q3_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q4_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q1_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q2_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q3_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q4_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q1_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q2_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q3_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q4_Current = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
//// Previous Year Count
let vCount_Student_Q1_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q2_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q3_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Student_Q4_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q1_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q2_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q3_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Parent_Q4_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q1_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q2_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q3_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCount_Teacher_Q4_Previous = 'Count({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
//// Current Count of non-skip, not applicable responses (e.g., "I don't know", "Not sure", "not applicable", etc)
let vCountNA_Student_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
//// Previous Year Count
let vCountNA_Student_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Student_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Parent_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vCountNA_Teacher_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
//// Current Count (Total)
let vCountTotal_Student_Q1_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q2_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q3_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q4_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q1_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q2_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q3_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q4_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q1_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q2_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q3_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q4_Current = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} scoreForDisplay)';
//// Previous Year Count (Total)
let vCountTotal_Student_Q1_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q2_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q3_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Student_Q4_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q1_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q2_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q3_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Parent_Q4_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q1_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q2_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q3_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
let vCountTotal_Teacher_Q4_Previous = 'Count(Total {$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} scoreForDisplay)';
//// Current Percent Most Positive
let vPercMP_Student_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q1_Current)';
let vPercMP_Student_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q2_Current)';
let vPercMP_Student_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q3_Current)';
let vPercMP_Student_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q4_Current)';
let vPercMP_Parent_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q1_Current)';
let vPercMP_Parent_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q2_Current)';
let vPercMP_Parent_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q3_Current)';
let vPercMP_Parent_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q4_Current)';
let vPercMP_Teacher_Q1_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q1_Current)';
let vPercMP_Teacher_Q2_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q2_Current)';
let vPercMP_Teacher_Q3_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q3_Current)';
let vPercMP_Teacher_Q4_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q4_Current)';
//// Previous Percent Most Positive
let vPercMP_Student_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q1_Previous)';
let vPercMP_Student_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q2_Previous)';
let vPercMP_Student_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q3_Previous)';
let vPercMP_Student_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Student_Q4_Previous)';
let vPercMP_Parent_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q1_Previous)';
let vPercMP_Parent_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q2_Previous)';
let vPercMP_Parent_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q3_Previous)';
let vPercMP_Parent_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Parent_Q4_Previous)';
let vPercMP_Teacher_Q1_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q1_Previous)';
let vPercMP_Teacher_Q2_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q2_Previous)';
let vPercMP_Teacher_Q3_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q3_Previous)';
let vPercMP_Teacher_Q4_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, responded={1}>} highest)
/ '&chr(36)&'(vCount_Teacher_Q4_Previous)';
//// Text for subtitle in % Most Positive KPIs
let vSubTitle_PercMPKPI_Student_Q1 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Student Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Student_Q1_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Student_Q2 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Student Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Student_Q2_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Student_Q3 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Student Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Student_Q3_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Student_Q4 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Student Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Student_Q4_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Parent_Q1 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Parent Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Parent_Q1_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Parent_Q2 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Parent Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Parent_Q2_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Parent_Q3 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Parent Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Parent_Q3_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Parent_Q4 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Parent Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Parent_Q4_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Teacher_Q1 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Teacher Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Teacher_Q1_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Teacher_Q2 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Teacher Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Teacher_Q2_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Teacher_Q3 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Teacher Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Teacher_Q3_Current),
'&chr(39)&'#,##0'&chr(39)&')';
let vSubTitle_PercMPKPI_Teacher_Q4 = chr(36)&'(=vMaxYear) & '&chr(39)&', # of Teacher Responses: '&chr(39)&' &
Num('&chr(36)&'(vCount_Teacher_Q4_Current),
'&chr(39)&'#,##0'&chr(39)&')';
//// Master Measures for KPIs - Current Year
let vmmPercMP_Student_Q1_Current = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q1_Current),
'&chr(36)&'(vPercMP_Student_Q1_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q2_Current = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q2_Current),
'&chr(36)&'(vPercMP_Student_Q2_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q3_Current = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q3_Current),
'&chr(36)&'(vPercMP_Student_Q3_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q4_Current = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q4_Current),
'&chr(36)&'(vPercMP_Student_Q4_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q1_Current = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q1_Current),
'&chr(36)&'(vPercMP_Parent_Q1_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q2_Current = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q2_Current),
'&chr(36)&'(vPercMP_Parent_Q2_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q3_Current = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q3_Current),
'&chr(36)&'(vPercMP_Parent_Q3_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q4_Current = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q4_Current),
'&chr(36)&'(vPercMP_Parent_Q4_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q1_Current = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q1_Current),
'&chr(36)&'(vPercMP_Teacher_Q1_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q2_Current = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q2_Current),
'&chr(36)&'(vPercMP_Teacher_Q2_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q3_Current = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q3_Current),
'&chr(36)&'(vPercMP_Teacher_Q3_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q4_Current = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q4_Current),
'&chr(36)&'(vPercMP_Teacher_Q4_Current), Null()), '&chr(39)&'#.#%'&chr(39)&')';
//// Master Measures for KPIs - YOY
let vmmPercMP_Student_Q1_YOY = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q1_Current) and
'&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q1_Previous),
'&chr(36)&'(vPercMP_Student_Q1_Current) -' &chr(36)&'(vPercMP_Student_Q1_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q2_YOY = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q2_Current) and
'&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q2_Previous),
'&chr(36)&'(vPercMP_Student_Q2_Current) -' &chr(36)&'(vPercMP_Student_Q2_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q3_YOY = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q3_Current) and
'&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q3_Previous),
'&chr(36)&'(vPercMP_Student_Q3_Current) -' &chr(36)&'(vPercMP_Student_Q3_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Q4_YOY = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q4_Current) and
'&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Q4_Previous),
'&chr(36)&'(vPercMP_Student_Q4_Current) -' &chr(36)&'(vPercMP_Student_Q4_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q1_YOY = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q1_Current) and
'&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q1_Previous),
'&chr(36)&'(vPercMP_Parent_Q1_Current) -' &chr(36)&'(vPercMP_Parent_Q1_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q2_YOY = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q2_Current) and
'&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q2_Previous),
'&chr(36)&'(vPercMP_Parent_Q2_Current) -' &chr(36)&'(vPercMP_Parent_Q2_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q3_YOY = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q3_Current) and
'&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q3_Previous),
'&chr(36)&'(vPercMP_Parent_Q3_Current) -' &chr(36)&'(vPercMP_Parent_Q3_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Q4_YOY = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q4_Current) and
'&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Q4_Previous),
'&chr(36)&'(vPercMP_Parent_Q4_Current) -' &chr(36)&'(vPercMP_Parent_Q4_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q1_YOY = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q1_Current) and
'&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q1_Previous),
'&chr(36)&'(vPercMP_Teacher_Q1_Current) -' &chr(36)&'(vPercMP_Teacher_Q1_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q2_YOY = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q2_Current) and
'&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q2_Previous),
'&chr(36)&'(vPercMP_Teacher_Q2_Current) -' &chr(36)&'(vPercMP_Teacher_Q2_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q3_YOY = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q3_Current) and
'&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q3_Previous),
'&chr(36)&'(vPercMP_Teacher_Q3_Current) -' &chr(36)&'(vPercMP_Teacher_Q3_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Q4_YOY = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q4_Current) and
'&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Q4_Previous),
'&chr(36)&'(vPercMP_Teacher_Q4_Current) -' &chr(36)&'(vPercMP_Teacher_Q4_Previous), Null()), '&chr(39)&'#.#%'&chr(39)&')';
//// Master Measures for Bar Charts - Current Year Note: the extra multiplier of 0 is for showing all dimensions in the bar chart)
let vmmRatio_Student_Q1_Current_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q1_Current),
'&chr(36)& '(vCount_Student_Q1_Current) / ' &chr(36)&'(vCountTotal_Student_Q1_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q2_Current_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q2_Current),
'&chr(36)& '(vCount_Student_Q2_Current) / ' &chr(36)&'(vCountTotal_Student_Q2_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q3_Current_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q3_Current),
'&chr(36)& '(vCount_Student_Q3_Current) / ' &chr(36)&'(vCountTotal_Student_Q3_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q4_Current_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q4_Current),
'&chr(36)& '(vCount_Student_Q4_Current) / ' &chr(36)&'(vCountTotal_Student_Q4_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q1_Current_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q1_Current),
'&chr(36)& '(vCount_Parent_Q1_Current) / ' &chr(36)&'(vCountTotal_Parent_Q1_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q2_Current_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q2_Current),
'&chr(36)& '(vCount_Parent_Q2_Current) / ' &chr(36)&'(vCountTotal_Parent_Q2_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q3_Current_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q3_Current),
'&chr(36)& '(vCount_Parent_Q3_Current) / ' &chr(36)&'(vCountTotal_Parent_Q3_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q4_Current_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q4_Current),
'&chr(36)& '(vCount_Parent_Q4_Current) / ' &chr(36)&'(vCountTotal_Parent_Q4_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q1_Current_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q1_Current),
'&chr(36)& '(vCount_Teacher_Q1_Current) / ' &chr(36)&'(vCountTotal_Teacher_Q1_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q2_Current_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q2_Current),
'&chr(36)& '(vCount_Teacher_Q2_Current) / ' &chr(36)&'(vCountTotal_Teacher_Q2_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q3_Current_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q3_Current),
'&chr(36)&'(vCount_Teacher_Q3_Current) / ' &chr(36)&'(vCountTotal_Teacher_Q3_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q4_Current_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q4_Current),
'&chr(36)& '(vCount_Teacher_Q4_Current) / ' &chr(36)&'(vCountTotal_Teacher_Q4_Current)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
//// Master Measures for Bar Charts - Previous Year
let vmmRatio_Student_Q1_Previous_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q1_Previous),
'&chr(36)& '(vCount_Student_Q1_Previous) / ' &chr(36)&'(vCountTotal_Student_Q1_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q2_Previous_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q2_Previous),
'&chr(36)& '(vCount_Student_Q2_Previous) / ' &chr(36)&'(vCountTotal_Student_Q2_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q3_Previous_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q3_Previous),
'&chr(36)& '(vCount_Student_Q3_Previous) / ' &chr(36)&'(vCountTotal_Student_Q3_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Student_Q4_Previous_Zero = 'Num(If('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCountTotal_Student_Q4_Previous),
'&chr(36)& '(vCount_Student_Q4_Previous) / ' &chr(36)&'(vCountTotal_Student_Q4_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vStudentQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q1_Previous_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q1_Previous),
'&chr(36)& '(vCount_Parent_Q1_Previous) / ' &chr(36)&'(vCountTotal_Parent_Q1_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q2_Previous_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q2_Previous),
'&chr(36)& '(vCount_Parent_Q2_Previous) / ' &chr(36)&'(vCountTotal_Parent_Q2_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q3_Previous_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q3_Previous),
'&chr(36)& '(vCount_Parent_Q3_Previous) / ' &chr(36)&'(vCountTotal_Parent_Q3_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Parent_Q4_Previous_Zero = 'Num(If('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCountTotal_Parent_Q4_Previous),
'&chr(36)& '(vCount_Parent_Q4_Previous) / ' &chr(36)&'(vCountTotal_Parent_Q4_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vParentQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q1_Previous_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q1_Previous),
'&chr(36)& '(vCount_Teacher_Q1_Previous) / ' &chr(36)&'(vCountTotal_Teacher_Q1_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode1))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q2_Previous_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q2_Previous),
'&chr(36)& '(vCount_Teacher_Q2_Previous) / ' &chr(36)&'(vCountTotal_Teacher_Q2_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode2))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q3_Previous_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q3_Previous),
'&chr(36)&'(vCount_Teacher_Q3_Previous) / ' &chr(36)&'(vCountTotal_Teacher_Q3_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode3))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
let vmmRatio_Teacher_Q4_Previous_Zero = 'Num(If('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCountTotal_Teacher_Q4_Previous),
'&chr(36)& '(vCount_Teacher_Q4_Previous) / ' &chr(36)&'(vCountTotal_Teacher_Q4_Previous)
+ -0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vTeacherQuestionCode4))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
>} responded)
, 0), '&chr(39)&'#.#%'&chr(39)&')';
///// Survey Focus Question
let vFocusQuestionCode = chr(39) & 'STUDENT|Q3f' & chr(39);
let vFocusQuestionCode2 = chr(39) & 'PARENT|Q7f' & chr(39);
let vFocusQuestion = 'Mode({1<surveyquestnum={'&chr(36)&'(vFocusQuestionCode)}>}questiondetailedtext)';
let vFocusQuestion2 = 'Mode({1<surveyquestnum={'&chr(36)&'(vFocusQuestionCode2)}>}questiondetailedtext)';
let vFocusQuestionMostPositive = 'Mode({1<surveyquestnum={'&chr(36)&'(vFocusQuestionCode)}, highest={1}>}choice)';
let vFocusQuestion2MostPositive = 'Mode({1<surveyquestnum={'&chr(36)&'(vFocusQuestionCode2)}, highest={1}>}choice)';
// for reference lines in district and network
let vCount_FocusQuestion_Current_District = 'Count({1< surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFocusQuestionCode))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} scoreForDisplay)';
let vPercMP_FocusQuestion_Current_District = 'Sum({1< surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFocusQuestionCode))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))} >} highest) / '&chr(36)&'(vCount_FocusQuestion_Current_District)';
let vCount_FocusQuestion_Current_Network = 'Count({1< surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFocusQuestionCode))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, learningnetwork = p() >} scoreForDisplay)';
let vPercMP_FocusQuestion_Current_Network = 'Sum({1< surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFocusQuestionCode))"}, YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, learningnetwork = p() >} highest) / '&chr(36)&'(vCount_FocusQuestion_Current_Network)';
///// Survey Focus Respondent Group and Topic
//// Selection vars
/// Basic group and respondent selection
let vCurrentRespondentSimple = chr(39)&'Student'&chr(39);
let vCurrentRespondentSimple2 = chr(39)&'Teacher'&chr(39);
let vCurrentTopic = chr(39)&'School Climate'&chr(39);
// vCurrentRespondent takes into account if there are any topics for this respondent group
let vCurrentRespondent = 'If('&chr(36)&'(vCurrentRespondentSimple) = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vCurrentTopic) = '&chr(39)&'Parent/Guardian-Community Ties'&chr(39)&', '&chr(39)&'Parent'&chr(39)&',
If(('&chr(36)&'(vCurrentRespondentSimple) = '&chr(39)&'Student'&chr(39)&' or '&chr(36)&'(vCurrentRespondentSimple) = '&chr(39)&'Parent'&chr(39)&') and ('&chr(36)&'(vCurrentTopic) = '&chr(39)&'School Leadership'&chr(39)&' or '&chr(36)&'(vCurrentTopic) = '&chr(39)&'Professional Capacity'&chr(39)&'),'&chr(39)&'Teacher'&chr(39)&',
'&chr(36)&'(vCurrentRespondentSimple)
))';
let vCurrentRespondent2 = 'If('&chr(36)&'(vCurrentRespondentSimple2) = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vCurrentTopic) = '&chr(39)&'Parent/Guardian-Community Ties'&chr(39)&', '&chr(39)&'Parent'&chr(39)&',
If(('&chr(36)&'(vCurrentRespondentSimple2) = '&chr(39)&'Student'&chr(39)&' or '&chr(36)&'(vCurrentRespondentSimple2) = '&chr(39)&'Parent'&chr(39)&') and ('&chr(36)&'(vCurrentTopic) = '&chr(39)&'School Leadership'&chr(39)&' or '&chr(36)&'(vCurrentTopic) = '&chr(39)&'Professional Capacity'&chr(39)&'),'&chr(39)&'Teacher'&chr(39)&',
'&chr(36)&'(vCurrentRespondentSimple2)
))';
// vCurrentOrFirstRespondent takes account of any selections the user has made to limit groups
let vCurrentOrFirstRespondent = 'If(GetSelectedCount(surveyTypeForDisplay)=0 or WildMatch(GetFieldSelections(surveyTypeForDisplay), '&chr(39)&'*'&chr(39)&'&'&chr(36)&'(vCurrentRespondent)&'&chr(39)&'*'&chr(39)&') > 0,
'&chr(36)&'(vCurrentRespondent),
MinString(surveyTypeForDisplay))';
let vCurrentOrFirstRespondent2 = 'If(GetSelectedCount(surveyTypeForDisplay)=0 or WildMatch(GetFieldSelections(surveyTypeForDisplay), '&chr(39)&'*'&chr(39)&'&'&chr(36)&'(='&chr(36)&'(vCurrentRespondent2))&'&chr(39)&'*'&chr(39)&') > 0,
'&chr(36)&'(vCurrentRespondent2),
MinString(surveyTypeForDisplay))';
/// First Question available (with sorting at sub-construct level)
// vFirstSubTopic is the first available subtopic for the given topic and available respondent
let vFirstSubTopic = 'MinString({'&chr(36)&'<
ISSQuestionTable_surveyTypeForDisplay={'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))},
ISSQuestionTable_questionconstruct={'&chr(36)&'(vCurrentTopic)},
ISSQuestionTable_Subconstruct={"*"}
>}ISSQuestionTable_Subconstruct)';
// vFirstQuestionDisplayed is the first available question for the first available sub-topic
// Note we replace single quotes with two single quotes, this allows set analysis later on where a single-quote would break the string
let vFirstQuestionDisplayed = 'If(GetSelectedCount(ISSQuestionTable_questiontext) > 0,
Replace(MinString(ISSQuestionTable_questiontext), Chr(39), Chr(39)&Chr(39)),
Replace(MinString({'&chr(36)&'<ISSQuestionTable_surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}, ISSQuestionTable_questionconstruct={'&chr(36)&'(vCurrentTopic)}, ISSQuestionTable_Subconstruct={"'&chr(36)&'(='&chr(36)&'(vFirstSubTopic))"}>}ISSQuestionTable_questiontext), Chr(39), Chr(39)&Chr(39))
)';
// vFirstQuestionKey is the code corresponding to the first displayed question
let vFirstQuestionKey = 'If(GetSelectedCount(ISSQuestionTable_questiontext) = 0,
MinString({'&chr(36)&'<ISSQuestionTable_questiontext={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionDisplayed))'&chr(39)&'}, ISSQuestionTable_questionconstruct={'&chr(36)&'(vCurrentTopic)}, ISSQuestionTable_surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"} >}ISSQuestionTable_surveyyearquestcode)
,
If( Count({'&chr(36)&'<ISSQuestionTable_questiontext={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionDisplayed))'&chr(39)&'}, ISSQuestionTable_surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}>} ISSQuestionTable_surveyyearquestcode) > 0,
MinString({'&chr(36)&'<ISSQuestionTable_questiontext={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionDisplayed))'&chr(39)&'}, ISSQuestionTable_surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}>}ISSQuestionTable_surveyyearquestcode),
MinString({'&chr(36)&'<ISSQuestionTable_questiontext={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionDisplayed))'&chr(39)&'}>}ISSQuestionTable_surveyyearquestcode)
)
)';
// vFirstQuestionm, vFirstQuestionRespondent and vFirstQuestionTopic are derived from the code (for display, not set analysis, use code)
//let vFirstQuestionCode = 'SubField('&chr(36)&'(vFirstQuestionKey),'&chr(39)&'|'&chr(39)&',1) &'&chr(39)&'|'&chr(39)&'& SubField('&chr(36)&'(vFirstQuestionKey),'&chr(39)&'|'&chr(39)&',3)';
let vFirstQuestionCode = 'Only({'&chr(36)&'<ISSQuestionTable_surveyyearquestcode={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionKey))"}>}ISSQuestionTable_surveyquestnum)';
//let vFirstQuestionYear = 'SubField('&chr(36)&'(vFirstQuestionKey),'&chr(39)&'|'&chr(39)&',2)';
//let vFirstQuestionYearEnd = 'SubField('&chr(36)&'(vFirstQuestionYear),'&chr(39)&'-'&chr(39)&',2)';
let vFirstQuestion = 'MinString({'&chr(36)&'<ISSQuestionTable_surveyyearquestcode={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionKey))"}>}ISSQuestionTable_questiontext)';
let vFirstQuestionRespondent = 'Only({'&chr(36)&'<ISSQuestionTable_surveyyearquestcode={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionKey))"}>}ISSQuestionTable_surveyTypeForDisplay)';
let vFirstQuestionTopic = 'Only({'&chr(36)&'<ISSQuestionTable_surveyyearquestcode={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionKey))"}>}ISSQuestionTable_questionconstruct)';
// measures for the graph.
let vCount_Respondent_Topic_Question_Current = 'Count(total {<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)';
let vCountNA_Respondent_Topic_Question_Current = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vRatio_Respondent_Topic_Question_Current = 'Count({<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
/
Count(total{<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)>} responded)';
let vmmRatio_Respondent_Topic_Question_Current = 'Num(
If(
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Parent'&chr(39)&' and '&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Teacher'&chr(39)&' and '&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Principal'&chr(39)&' and '&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current)
,
'&chr(36)&'(vRatio_Respondent_Topic_Question_Current), 0)
,'&chr(39)&'#.#%'&chr(39)&')';
let vCount_Respondent_Topic_Question_Previous = 'Count(total {<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)';
let vCountNA_Respondent_Topic_Question_Previous = 'Sum({$<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}>} responded)';
let vRatio_Respondent_Topic_Question_Previous = 'Count({<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
/
Count(total{<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)
- 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)>} responded)';
let vmmRatio_Respondent_Topic_Question_Previous = 'Num(
If(
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Parent'&chr(39)&' and '&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Teacher'&chr(39)&' and '&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Principal'&chr(39)&' and '&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous)
,
'&chr(36)&'(vRatio_Respondent_Topic_Question_Previous), 0)
,'&chr(39)&'#.#%'&chr(39)&')';
let vCount_Respondent_Topic_Question_Current_Alt = 'Count(total {1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}> * Alt} scoreChoiceForDisplay)';
let vCountNA_Respondent_Topic_Question_Current_Alt = 'Sum({1<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, scoreNoSkips={">100"}> * Alt} responded)';
let vRatio_Respondent_Topic_Question_Current_Alt = 'Count({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}> * Alt} scoreChoiceForDisplay)
/
Count(total{1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}> * Alt} scoreChoiceForDisplay)
+ 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}scoreChoiceForDisplay)>} responded)';
let vmmRatio_Respondent_Topic_Question_Current_Alt = 'Num(
If(
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Parent'&chr(39)&' and '&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Teacher'&chr(39)&' and '&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Principal'&chr(39)&' and '&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Current_Alt)
,
'&chr(36)&'(vRatio_Respondent_Topic_Question_Current_Alt), 0)
,'&chr(39)&'#.#%'&chr(39)&')';
let vCount_Respondent_Topic_Question_Previous_Alt = 'Count(total {1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}> * Alt} scoreChoiceForDisplay)';
let vCountNA_Respondent_Topic_Question_Previous_Alt = 'Sum({1<
surveyquestnum={'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))'&chr(39)&'},
YearEnd = {'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}, scoreNoSkips={">100"}> * Alt} responded)';
let vRatio_Respondent_Topic_Question_Previous_Alt = 'Count({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}> * Alt} scoreChoiceForDisplay)
/
Count(total{1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"},YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}> * Alt} scoreChoiceForDisplay)
- 0.000001 * Max({1<scoreChoiceForDisplay=P({1<surveyquestnum={"'&chr(36)&'(='&chr(36)&'(vFirstQuestionCode))"}, YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}scoreChoiceForDisplay)>} responded)';
let vmmRatio_Respondent_Topic_Question_Previous_Alt = 'Num(
If(
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Student'&chr(39)&' and '&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Parent'&chr(39)&' and '&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Teacher'&chr(39)&' and '&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous_Alt) or
'&chr(39)&chr(36)&'(='&chr(36)&'(vFirstQuestionRespondent))'&chr(39)&' = '&chr(39)&'Principal'&chr(39)&' and '&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Respondent_Topic_Question_Previous_Alt)
,
'&chr(36)&'(vRatio_Respondent_Topic_Question_Previous_Alt), 0)
,'&chr(39)&'#.#%'&chr(39)&')';
///// Survey Constructs and Subconstruct - Percent Most Positive (down and across method)
//// Selected Respondent and Selected Topic
let vCurrentOrFirstRespondent_Min = 'IF('&chr(36)&'(vCurrentOrFirstRespondent) = '&chr(39)&'Student'&chr(39)&', '&chr(36)&'(vMinStudents), IF('&chr(36)&'(vCurrentOrFirstRespondent) = '&chr(39)&'Parent'&chr(39)&', '&chr(36)&'(vMinParents), IF('&chr(36)&'(vCurrentOrFirstRespondent) = '&chr(39)&'Teacher'&chr(39)&', '&chr(36)&'(vMinTeachers), IF('&chr(36)&'(vCurrentOrFirstRespondent) = '&chr(39)&'Principal'&chr(39)&', '&chr(36)&'(vMinPrincipals), 5))))';
/// Current Year
let vSet_Respondent_Topic_Current = '{<surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}, ISSQuestionTable_questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Respondent_Topic_Current = 'Count(distinct '&chr(36)&'(vSet_Respondent_Topic_Current) respondentid)';
let vPercMP_Respondent_Topic_Current = 'RangeAvg(Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_1)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_1), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_2)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_2), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_3)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_3), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_4)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_4), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_5)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_5), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_6)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_6), Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NHighest_7)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current) NCompleted_7))';
let vmmPercMP_Respondent_Topic_Current = 'Num(IF('&chr(36)&'(vCurrentOrFirstRespondent_Min) <= '&chr(36)&'(vCount_Respondent_Topic_Current), '&chr(36)&'(vPercMP_Respondent_Topic_Current), Null()),'&chr(39)&'#.#%'&chr(39)&')';
// Previous Year
let vSet_Respondent_Topic_Previous = '{<surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vLastYearEnd))}>}';
let vCount_Respondent_Topic_Previous = 'Count(distinct '&chr(36)&'(vSet_Respondent_Topic_Previous) respondentid)';
let vPercMP_Respondent_Topic_Previous = 'RangeAvg(Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_1)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_1), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_2)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_2), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_3)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_3), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_4)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_4), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_5)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_5), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_6)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_6), Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NHighest_7)/Sum('&chr(36)&'(vSet_Respondent_Topic_Previous) NCompleted_7))';
let vmmPercMP_Respondent_Topic_Previous = 'Num(IF('&chr(36)&'(vCurrentOrFirstRespondent_Min) <= '&chr(36)&'(vCount_Respondent_Topic_Previous), '&chr(36)&'(vPercMP_Respondent_Topic_Previous), Null()),'&chr(39)&'#.#%'&chr(39)&')';
// District and network wide (for reference lines)
let vSet_Respondent_Topic_Current_District = '{1<surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Respondent_Topic_Current_District = 'Count(distinct '&chr(36)&'(vSet_Respondent_Topic_Current_District) respondentid)';
let vPercMP_Respondent_Topic_Current_District = 'RangeAvg(Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_1)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_1), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_2)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_2), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_3)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_3), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_4)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_4), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_5)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_5), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_6)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_6), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NHighest_7)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_District) NCompleted_7))';
let vSet_Respondent_Topic_Current_Network = '{1<surveyTypeForDisplay={"'&chr(36)&'(='&chr(36)&'(vCurrentOrFirstRespondent))"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}, learningnetwork = p() >}';
let vCount_Respondent_Topic_Current_Network = 'Count(distinct '&chr(36)&'(vSet_Respondent_Topic_Current_Network) respondentid)';
let vPercMP_Respondent_Topic_Current_Network = 'RangeAvg(Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_1)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_1), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_2)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_2), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_3)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_3), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_4)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_4), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_5)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_5), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_6)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_6), Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NHighest_7)/Sum('&chr(36)&'(vSet_Respondent_Topic_Current_Network) NCompleted_7))';
// YOY
let vmmPercMP_Respondent_Topic_YOY = 'Num('&chr(36)&'(vmmPercMP_Respondent_Topic_Current) - '&chr(36)&'(vmmPercMP_Respondent_Topic_Previous), '&chr(39)&'#.#%'&chr(39)&')';
//// Selected Topic each respondent
/// Current Year
let vSet_Student_Topic_Current = '{<surveyTypeForDisplay={"Student"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Student_Topic_Current = 'Count(distinct '&chr(36)&'(vSet_Student_Topic_Current) respondentid)';
let vPercMP_Student_Topic_Current = 'RangeAvg(Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_1)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_1), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_2)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_2), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_3)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_3), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_4)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_4), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_5)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_5), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_6)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_6), Sum('&chr(36)&'(vSet_Student_Topic_Current) NHighest_7)/Sum('&chr(36)&'(vSet_Student_Topic_Current) NCompleted_7))';
let vmmPercMP_Student_Topic_Current = 'Num(IF('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Topic_Current), '&chr(36)&'(vPercMP_Student_Topic_Current), Null()),'&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Student_Topic_Current_Neg = 'Num(IF('&chr(36)&'(vMinStudents) <= '&chr(36)&'(vCount_Student_Topic_Current), '&chr(36)&'(vPercMP_Student_Topic_Current), -1),'&chr(39)&'#.#%'&chr(39)&')';
let vSet_Parent_Topic_Current = '{<surveyTypeForDisplay={"Parent"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Parent_Topic_Current = 'Count(distinct '&chr(36)&'(vSet_Parent_Topic_Current) respondentid)';
let vPercMP_Parent_Topic_Current = 'RangeAvg(Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_1)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_1), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_2)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_2), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_3)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_3), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_4)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_4), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_5)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_5), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_6)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_6), Sum('&chr(36)&'(vSet_Parent_Topic_Current) NHighest_7)/Sum('&chr(36)&'(vSet_Parent_Topic_Current) NCompleted_7))';
let vmmPercMP_Parent_Topic_Current = 'Num(IF('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Topic_Current), '&chr(36)&'(vPercMP_Parent_Topic_Current), Null()),'&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Parent_Topic_Current_Neg = 'Num(IF('&chr(36)&'(vMinParents) <= '&chr(36)&'(vCount_Parent_Topic_Current), '&chr(36)&'(vPercMP_Parent_Topic_Current), -1),'&chr(39)&'#.#%'&chr(39)&')';
let vSet_Teacher_Topic_Current = '{<surveyTypeForDisplay={"Teacher"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Teacher_Topic_Current = 'Count(distinct '&chr(36)&'(vSet_Teacher_Topic_Current) respondentid)';
let vPercMP_Teacher_Topic_Current = 'RangeAvg(Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_1)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_1), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_2)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_2), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_3)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_3), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_4)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_4), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_5)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_5), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_6)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_6), Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NHighest_7)/Sum('&chr(36)&'(vSet_Teacher_Topic_Current) NCompleted_7))';
let vmmPercMP_Teacher_Topic_Current = 'Num(IF('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Topic_Current), '&chr(36)&'(vPercMP_Teacher_Topic_Current), Null()),'&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Teacher_Topic_Current_Neg = 'Num(IF('&chr(36)&'(vMinTeachers) <= '&chr(36)&'(vCount_Teacher_Topic_Current), '&chr(36)&'(vPercMP_Teacher_Topic_Current), -1),'&chr(39)&'#.#%'&chr(39)&')';
let vSet_Principal_Topic_Current = '{<surveyTypeForDisplay={"Principal"}, questionconstruct={'&chr(36)&'(vCurrentTopic)}, YearEnd={'&chr(36)&'(='&chr(36)&'(vMaxYearEnd))}>}';
let vCount_Principal_Topic_Current = 'Count(distinct '&chr(36)&'(vSet_Principal_Topic_Current) respondentid)';
let vPercMP_Principal_Topic_Current = 'RangeAvg(Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_1)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_1), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_2)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_2), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_3)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_3), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_4)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_4), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_5)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_5), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_6)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_6), Sum('&chr(36)&'(vSet_Principal_Topic_Current) NHighest_7)/Sum('&chr(36)&'(vSet_Principal_Topic_Current) NCompleted_7))';
let vmmPercMP_Principal_Topic_Current = 'Num(IF('&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Principal_Topic_Current), '&chr(36)&'(vPercMP_Principal_Topic_Current), Null()),'&chr(39)&'#.#%'&chr(39)&')';
let vmmPercMP_Principal_Topic_Current_Neg = 'Num(IF('&chr(36)&'(vMinPrincipals) <= '&chr(36)&'(vCount_Principal_Topic_Current), '&chr(36)&'(vPercMP_Principal_Topic_Current), -1),'&chr(39)&'#.#%'&chr(39)&')';