Axis in MDX

9532
55778

Friends,

Most important function of MDX is AXIS. The Axis function returns a set of tuples on the specified axis. PFB syntax of AXIS function.

“Axis(Number)”

Number – is a valid numeric expression which specifies the axis number.

The position starts from 0 and it can be continued as the cube database data is MULTI dimensional. MDX query is capable of returning data in more than two dimensions but our systems doesn’t support it. As our systems support only up to two dimensions, our MDX queries will stick to two AXIS only. For example, Axis(0) returns the COLUMNS axis, Axis(1) returns the ROWS axis, and so on. The Axis function cannot be used on the filter axis. The Axis numbers should be in order. You cannot use AXIS(1) without defining AXIS(0). PFB the sequence –

AXIS(0) or simply 0 – Columns

AXIS(1) or simply 1 – Rows

AXIS(2) or simply 2 – Pages

AXIS(3) or simply 3 – Sections

……….

……….

You can use any format to define AXIS like AXIS(Number) or Simply Number or with name like columns,rows,pages .. PFB sample queries of all three kinds –

Using AXIS –

select [Measures].[Sales Amount] on Axis(0),
[Dim Product].[Products].[Products] on Axis(1)
From [Adventure Works]

Using Number –

select [Measures].[Sales Amount] on 0,
[Dim Product].[Products].[Products] on 1
From [Adventure Works]

Using Name –

select [Measures].[Sales Amount] on Columns,
[Dim Product].[Products].[Products] on Rows
From [Adventure Works]

For all the above three queries the result set is same and the screenshot of the same is shown below –

That’s the complete story about AXIS function and hope you understood the concept. Happy Coding !!

Regards,

Roopesh Babu V

9532 COMMENTS

  1. Свадьба –один из самых счастливых моментов нашей жизни. Так хочется чтобы теплые воспоминание об этом дне остались на вечно. Поэтому [url=https://vk.com/weddingspbvideo]свадебная видеосъемка[/url] организовывая свою свадьбу молодожены должны задуматься о качественной видео и фотосъемке, https://vk.com/weddingspbvideo чтобы спустя много лет просматривая свой свадебный фильм и фото погрузится в атмосферу этого счастливого дня. На сегодняшний день [url=https://vk.com/phvideowedding]фото и видеосъемка свадеб[/url] – это одно из составляющих этого главного дня в создании молодой семьи.

  2. Наша компания предлагает услуги по изготовлению мебели на заказ [url=http://mebel-dlya-was.ru/]мебель на заказ[/url] будет полностью соответствовать вашим потребностям и предпочтениям.

  3. Latvija tiessaistes kazino ir kluvusi arvien popularaki, piedavajot speletajiem iespeju baudit dazadas azartspeles no majam vai celojot. Lai darbotos legali, [url=https://steemit.com/gambling/@kasinoid/gambling-ir-spelu-veids-kas-pamatojas-uz-nejausibas-elementu-kura-speletaji-liek-naudu-uz-kada-notikuma-iznakumu-cerot-uz-uzvaru]https://steemit.com/gambling/@kasinoid/gambling-ir-spelu-veids-kas-pamatojas-uz-nejausibas-elementu-kura-speletaji-liek-naudu-uz-kada-notikuma-iznakumu-cerot-uz-uzvaru[/url] tiessaistes kazino Latvija ir jabut licencetiem no attiecigajam iestadem. Sie kazino piedava plasu spelu klastu, tostarp spelu automatus, galda speles, pokera turnirus un sporta likmju deribas.

  4. На этом сайте представлена простая и удобная программа ТВ передач — [url=https://tv-programma1.ru/]программа на сегодня на[/url] на сегодня, на завтра, на неделю.

  5. Компания ЗубыПро представляет профессиональные услуги по надеванию, корректировке и снятию брекет-систем [url=https://intofact.ru/zdorovaya-ulybka-sovremennye-tehnologii-lecheniya-zubov/]https://zubypro.ru[/url] в Санкт-Петербурге.

  6. Простая и удобная тв программа на сегодня, [url=https://www.tv-programma2.ru/]программа на сегодня на[/url] на завтра, на неделю.

  7. 888starz is an online casino that offers players the opportunity to play various gambling games, such as slots, roulette, blackjack, and others, using cryptocurrencies https://twitter.com/888starzlv
    The casino is operated by Bittech B.V. and is licensed and regulated by the Government of Curacao. In addition to traditional casino games, 888starz.bet also offers sports betting, live casino games, and virtual sports. The website has a user-friendly interface and supports multiple languages, making it accessible to players from around the world

  8. sexual dysfunction in men [url=https://cheapdr.top/#]ed vacuum pumps[/url] comfortis for dogs without vet prescription

  9. Мы предлагаем широкий спектр услуг по перетяжке мебели [url=https://csalon.ru/]Перетяжка мягкой мебели[/url] от классических до современных стилей.