例
以下の例では、市町村が行として使用されています。列に表示されるデータは、市町村ごとの Principal Export プロパティで、PROPERTIES 関数を使用して取得されます。
SELECT homed.CURRENTMEMBER.PROPERTIES("Principal Export") ON 0, homed.city.MEMBERS ON 1
FROM patients
Home ZIP
1 Cedar Falls iron
2 Centerville video games
3 Cypress gravel
4 Elm Heights lettuce
5 Juniper wheat
6 Magnolia bundt cake
7 Pine spaghetti
8 Redwood peaches
9 Spruce mud
以下のバリエーションは、%LABEL 関数を使用して、わかりやすいキャプションをデータ列に指定しています。
SELECT %LABEL(homed.CURRENTMEMBER.PROPERTIES("Principal Export"),"Exports") ON 0,
homed.city.MEMBERS ON 1 FROM patients
Export
1 Cedar Falls iron
2 Centerville video games
3 Cypress gravel
4 Elm Heights lettuce
5 Juniper wheat
6 Magnolia bundt cake
7 Pine spaghetti
8 Redwood peaches
9 Spruce mud
以下のクエリは、City レベルの Principal Export プロパティと Population プロパティの両方を示しています。
SELECT {%LABEL(homed.CURRENTMEMBER.PROPERTIES("Principal Export"),"Export"),
%LABEL(homed.CURRENTMEMBER.PROPERTIES("Population"),"Population")} ON 0,
homed.city.MEMBERS ON 1 FROM patients
Export Population
1 Cedar Falls iron 90,000
2 Centerville video games 49,000
3 Cypress gravel 3,000
4 Elm Heights lettuce 33,194
5 Juniper wheat 10,333
6 Magnolia bundt cake 4,503
7 Pine spaghetti 15,060
8 Redwood peaches 29,192
9 Spruce mud 5,900