Forum Discussion

KMST's avatar
KMST
Regular Visitor
6 years ago

MDX Import returns all levels from selected dimension instead of one

Hi all,

My multidimensional db has chart of accounts dimension (ragged), and when I attempt to import data for one of the account's children, instead of one Account column I get all Levels in multiple columns instead:

 

 

Query I use:

WITH MEMBER [Measures].Dummy as 100
select
{ [Measures].[Dummy] } ON 0,
{ [Account].[H1].[100399_Rev_Ext_ex_ex].children } ON 1
FROM [Finance]

 

I was writing this query in SSMS, where result was somewhat different, with only one column for accounts. I wonder if there is a way to achieve same result as in SSMS in PBI (and not only for getting children, but also using DESCENDANTS for taking wider scope), where only one column is returned for accounts:

 

I've been googling for some time, but failed to find the solution so far. Thanks for any suggestions.

 

1 Reply

  • ImkeF's avatar
    ImkeF
    Icon for Community Champion rankCommunity Champion

    Hi KMST ,

    don't know if it's possible to achieve this with an adjusted MDX script.

    But you can easily achieve the desired format by adding a column with this formula:

     

    Record.FieldValues( Record.RemoveFields(_, {"[Measures].[Dummy]"}))

    This returns a list with all non-Dummy-values that you can then expand vertically.