danpurcell
Programmer
I am new to MDX and this seems to be a simple question.
I have a database that table that has two columns: one column has the client_id in the other column has the client's name.
Would like MDX query that contains an axis that uses the client's id to query but that shows the client's name.
This works, but shows all the client's id not the client's names.
The client's is also in the ad_dimension table in column called "client"
<Dimension name="Ad">
<Hierarchy hasAll="true" allMemberName="All Ads" primaryKey="ad_id">
<Table schema="oltp" name="ad_dimension"/>
<Level name="Client" column="client_id" numeric="true" uniqueMembers="false"/>
</Hierarchy>
</Dimension>
<Cube name="Events">
<Table schema="oltp" name="events_fact"/>
<DimensionUsage name="Ad" source="Ad" foreignKey="ad_id"/>
<Measure name="Events" column="event_count" aggregator="sum" formatString="#,###"/>
</Cube>
The following query show the
select
{[Measures].[Events]} on columns,
{( [Ad].[2] )} ON rows
from Events
I have a database that table that has two columns: one column has the client_id in the other column has the client's name.
Would like MDX query that contains an axis that uses the client's id to query but that shows the client's name.
This works, but shows all the client's id not the client's names.
The client's is also in the ad_dimension table in column called "client"
<Dimension name="Ad">
<Hierarchy hasAll="true" allMemberName="All Ads" primaryKey="ad_id">
<Table schema="oltp" name="ad_dimension"/>
<Level name="Client" column="client_id" numeric="true" uniqueMembers="false"/>
</Hierarchy>
</Dimension>
<Cube name="Events">
<Table schema="oltp" name="events_fact"/>
<DimensionUsage name="Ad" source="Ad" foreignKey="ad_id"/>
<Measure name="Events" column="event_count" aggregator="sum" formatString="#,###"/>
</Cube>
The following query show the
select
{[Measures].[Events]} on columns,
{( [Ad].[2] )} ON rows
from Events