<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Need assistance creating an MDX query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187564#M265763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I was wondering if I could get some assistance with a MDX script used to generate a file for loading to the General Ledger system, and have hit a snag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The format of the file is as follows and will have 8 columns when all is said and done.&amp;nbsp; All of the information has to be left justified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column 1 - the account member name&lt;/P&gt;&lt;P&gt;Column 2 - a dummy column with a value of 2&lt;/P&gt;&lt;P&gt;Column 3 - the first three characters truncated so the end result is 01&lt;/P&gt;&lt;P&gt;Column 4 - the department member name&lt;/P&gt;&lt;P&gt;Column 5 - the alias of the account in column 1&lt;/P&gt;&lt;P&gt;Column 6 - a 12 character field with the value padded with zeroes&lt;/P&gt;&lt;P&gt;Column 7 - a 12 character field with the value padded with zeroes&lt;/P&gt;&lt;P&gt;Column 8 - a dummy column with a value of Gen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code that I have come up with so far...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT {[time periods].Children} ON COLUMNS,&lt;BR /&gt;{[S1_department].Levels(0).members} ON AXIS(1),&lt;BR /&gt;{[S1_Office].Levels(0).members} ON AXIS(2),&lt;BR /&gt;{[allocations].Levels(0).members} ON AXIS(3)&lt;/P&gt;&lt;P&gt;from [HPCMsR].[HPCMsR];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the expected output&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="183" style="width: 968px; height: 126px;" width="965"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="97"&gt;Acct code (12)&lt;/TD&gt;&lt;TD width="68"&gt;Ledger(4)&lt;/TD&gt;&lt;TD width="64"&gt;Office(4)&lt;/TD&gt;&lt;TD width="55"&gt;Dept(4)&lt;/TD&gt;&lt;TD width="130"&gt;Text(30)&lt;/TD&gt;&lt;TD width="94"&gt;Debit(12)&lt;/TD&gt;&lt;TD width="94"&gt;Credit(12)&lt;/TD&gt;&lt;TD width="51"&gt;Prof(4)&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="19"&gt;98800&lt;/TD&gt;&lt;TD class="xl65"&gt;2&lt;/TD&gt;&lt;TD class="xl65"&gt;01&lt;/TD&gt;&lt;TD class="xl65"&gt;61&lt;/TD&gt;&lt;TD class="xl65"&gt;Reclass from Occpy&lt;/TD&gt;&lt;TD class="xl65"&gt;000047539265&lt;/TD&gt;&lt;TD class="xl65"&gt;000000000000&lt;/TD&gt;&lt;TD class="xl65"&gt;GEN&lt;/TD&gt; &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Mar 2015 16:18:44 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2015-03-01T16:18:44Z</dc:date>
    <item>
      <title>Need assistance creating an MDX query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187564#M265763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I was wondering if I could get some assistance with a MDX script used to generate a file for loading to the General Ledger system, and have hit a snag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The format of the file is as follows and will have 8 columns when all is said and done.&amp;nbsp; All of the information has to be left justified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Column 1 - the account member name&lt;/P&gt;&lt;P&gt;Column 2 - a dummy column with a value of 2&lt;/P&gt;&lt;P&gt;Column 3 - the first three characters truncated so the end result is 01&lt;/P&gt;&lt;P&gt;Column 4 - the department member name&lt;/P&gt;&lt;P&gt;Column 5 - the alias of the account in column 1&lt;/P&gt;&lt;P&gt;Column 6 - a 12 character field with the value padded with zeroes&lt;/P&gt;&lt;P&gt;Column 7 - a 12 character field with the value padded with zeroes&lt;/P&gt;&lt;P&gt;Column 8 - a dummy column with a value of Gen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code that I have come up with so far...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT {[time periods].Children} ON COLUMNS,&lt;BR /&gt;{[S1_department].Levels(0).members} ON AXIS(1),&lt;BR /&gt;{[S1_Office].Levels(0).members} ON AXIS(2),&lt;BR /&gt;{[allocations].Levels(0).members} ON AXIS(3)&lt;/P&gt;&lt;P&gt;from [HPCMsR].[HPCMsR];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the expected output&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="183" style="width: 968px; height: 126px;" width="965"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="97"&gt;Acct code (12)&lt;/TD&gt;&lt;TD width="68"&gt;Ledger(4)&lt;/TD&gt;&lt;TD width="64"&gt;Office(4)&lt;/TD&gt;&lt;TD width="55"&gt;Dept(4)&lt;/TD&gt;&lt;TD width="130"&gt;Text(30)&lt;/TD&gt;&lt;TD width="94"&gt;Debit(12)&lt;/TD&gt;&lt;TD width="94"&gt;Credit(12)&lt;/TD&gt;&lt;TD width="51"&gt;Prof(4)&lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl65" height="19"&gt;98800&lt;/TD&gt;&lt;TD class="xl65"&gt;2&lt;/TD&gt;&lt;TD class="xl65"&gt;01&lt;/TD&gt;&lt;TD class="xl65"&gt;61&lt;/TD&gt;&lt;TD class="xl65"&gt;Reclass from Occpy&lt;/TD&gt;&lt;TD class="xl65"&gt;000047539265&lt;/TD&gt;&lt;TD class="xl65"&gt;000000000000&lt;/TD&gt;&lt;TD class="xl65"&gt;GEN&lt;/TD&gt; &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Mar 2015 16:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187564#M265763</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2015-03-01T16:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need assistance creating an MDX query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187565#M265764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any chance someone can assist me with this?&amp;nbsp; If not, is there a support desk or something to that effect that can contact?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Mar 2015 17:53:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187565#M265764</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2015-03-01T17:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need assistance creating an MDX query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187566#M265765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the bottom of the page, in the footer, is a link to tech support (submit a problem report). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may also help if you post this in an appropriate forum, right now its in the general Support Communities. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Mar 2015 18:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187566#M265765</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-03-01T18:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need assistance creating an MDX query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187567#M265766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have SAS Enterprise Guide?&amp;nbsp; If so, you may be able to use the OLAP Analyzer to design your view -- if your data source is from a SAS OLAP Server or from Microsoft Analysis Server (SQL Server).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the OLAP Analyzer in SAS Enterprise Guide and no additional license is needed.&amp;nbsp; Simply define the data source as a "Private OLAP Server" in the&lt;STRONG&gt; File-&amp;gt;Open OLAP Cube&lt;/STRONG&gt; window.&amp;nbsp; Then specify the server host and credentials.&amp;nbsp; The connection uses OLE DB for OLAP (ODBO) -- a Microsoft data access standard for cubes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OLAP Analyzer is quite powerful, and as you navigate the views you want you can always view the generated MDX code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Mar 2015 18:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-assistance-creating-an-MDX-query/m-p/187567#M265766</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-03-01T18:39:53Z</dc:date>
    </item>
  </channel>
</rss>

