PDA

View Full Version : PQ - Random questions limited (52)



sandy666
05-11-2020, 04:11 AM
Random questions limited (52)


source (named range: tblQ)Result

IDQuestions
ID
Questions


1Q 001
98
Q 098


2Q 002
143
Q 143


3Q 003
190
Q 190


4Q 004
156
Q 156


5Q 005
13
Q 013


6Q 006
166
Q 166

……
95
Q 095


195Q 195
49
Q 049


196Q 196
146
Q 146


197Q 197
181
Q 181


198Q 198
44
Q 044


199Q 199
176
Q 176


200Q 200
89
Q 089


7
Q 007


129
Q 129


2
Q 002


74
Q 074


8
Q 008


103
Q 103


142
Q 142


96
Q 096


33
Q 033


175
Q 175


120
Q 120


122
Q 122


179
Q 179


53
Q 053


139
Q 139


15
Q 015


83
Q 083


19
Q 019


80
Q 080


4
Q 004


105
Q 105


30
Q 030


35
Q 035


162
Q 162


91
Q 091


85
Q 085


36
Q 036


28
Q 028


126
Q 126


18
Q 018


20
Q 020


124
Q 124


48
Q 048


40
Q 040


132
Q 132


170
Q 170


82
Q 082


60
Q 060


94
Q 094



let
Source = Excel.CurrentWorkbook(),
RawData = Table.PromoteHeaders(Source{[Name="tblQ"]}[Content],[PromoteAllScalars=true]),
Random = Table.Sort(Table.ExpandListColumn(Table.AddColumn( RawData, "Rnd", each List.Random(1)), "Rnd"),{{"Rnd", Order.Ascending}}),
Kept52 = Table.FirstN(Table.RemoveColumns(Random,{"Rnd"}),52)
in
Kept52