Add Dimensions array as range in MSD axapta

Add Dimensions array as range in axapta

QueryBuildDatasource qbds;
Query Q;
QueryRun QR;
;
Q=new Query();
qbds=Q.addDatasource(Tablenum(Table1));

qbds.addRange(fieldId2Ext(fieldnum(Table1,dimensionfield),1)).value('xyz')

QR=New QueryRun(Q);
While (Qr.next())
{
}