How can I remove line breaks from MDX query?

dmartensen

New Member
Joined
Aug 12, 2014
Messages
1
I am relatively new to MDX queries and trying to create a BI tool within Excel Power Pivot.

When I execute the below MDX query, it appears that the destination has line breaks in the data cube and Excel occasionally breaks the output into separate lines. I thought that building a powerpivot solution would be the route to go, however, I am finding similar results when I create a table relation. I am wondering if there is an easy way to convert the destination member results into a string somehow?

MDX Query

select nonempty({[Measures].[Char<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">geToCustom<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">er],[Measu<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">res].[clcR<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">ebateToCus<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">tomer],[Me<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">asures].[D<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">estination<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">Rate],[Mea<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">sures].[To<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">talShares]<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">,[Measures<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">].[RebateT<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">oCustomer]<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">,[Measures<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">].[SubDoll<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">arShares]}<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">) on columns,
nonempty ({[ROUTE].[ROUTE].[route] * [DESTINATION].[DestType].[<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">DestType] * [DESTINATION].[DESTINATION<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">].[destina<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">tion] }) on rows
from [PNL_data]
where [Time].[Month].&[2014-03-0<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">1T00:00:00<wbr style="font-size: 14px; font-family: 'Open Sans', sans-serif; line-height: 22px;">];

Below is a screenshot of the spreadsheet that shows the line breaks occurring in Excel (Row 64, Column D is first instance)

http://screencast.com/t/PclQeG44ERfg
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,226,695
Messages
6,192,481
Members
453,727
Latest member
tuong_ng89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top