Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Essbase Adapter (Import Data)

Hi

We are doing some PoC with PowerBI to report out of essbase cube.

 

With the advanced Editor and some custom code, I could connect to Essbase and apply some filter criteria.

 

But as Essbase allows ragged hierarchy and We have lots of requirements to show all the bottom level members below a specific parent. I am struggling to have that working in PowerBI.

 

As PowerBI works based on Levels, I am struggle to create a filter that would allow me to use LEAVES(<Member>).

 

From Essbase MDX trace, I can see that the MDX has been run successfully.

 

But PowerBI reports the error

 

Feedback Type:
Frown (Error)

Error Message:
The ReadElementContentAsString method is not supported on node type EndElement. Line 145, position 3.

 

 

Below is a sample which is not working at the moment.

 

    #"Added Items" = Cube.Transform(CostApp.CostDB,
        {
           
            {Cube.AddAndExpandDimensionColumn, "[Years]", {"[Years].Levels(1)"}, {"Years"}},
            {Cube.AddAndExpandDimensionColumn, "[Currency]", {"[Currency].Levels(1)"}, {"Currency"}},
            {Cube.AddAndExpandDimensionColumn, "[Period]", {"[Period].Levels(1)"}, {"Period"}},
            {Cube.AddAndExpandDimensionColumn, "[Scenario]", {"[Scenario].Levels(1)"}, {"Scenario"}},
            {Cube.AddAndExpandDimensionColumn, "[Version]", {"[Version].Levels(1)"}, {"Version"}},
            {Cube.AddAndExpandDimensionColumn, "[CC_Department]", {"[CC_Department].Levels(5)"}, {"Department"}},

            {Cube.AddAndExpandDimensionColumn, "[CC_DataSource]", {"[CC_DataSource].Levels(1)"}, {"DataSource"}},
            {Cube.AddMeasureColumn, "Total Costs", "[Total Costs]"}
        }),
    #"Filtered Rows" = Table.SelectRows(#"Added Items", each (Cube.AttributeMemberId([#"Years"]) = "{[FY19]}"
                                                        and Cube.AttributeMemberId([#"Currency"]) = "{[GBP]}"
                                                        and Cube.AttributeMemberId([#"Period"]) = "{[YearTotal]}"
                                                        and Cube.AttributeMemberId([#"Scenario"]) = "{[Actual]}"
                                                        and Cube.AttributeMemberId([#"Version"]) = "{[Final]}"
                                                        and Cube.AttributeMemberId([#"Department"]) = "{DESCENDANTS([Total Support Services],1)}"
                                                        and Cube.AttributeMemberId([#"DataSource"]) = "Leaves([TotalDS])"
                                                        )
                                        )

 

Will be greatly appreciated, if you have any Custom Functions/workaround for similar queries.

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Is the [FY19] a value or a column name, are all [**] in your "filter row" formula values or column names?

Table.SelectRows(#"Added Items", each (Cube.AttributeMemberId([#"Years"]) = "{[FY19]}"
                                                        and Cube.AttributeMemberId([#"Currency"]) = "{[GBP]}"

Where do you use ReadElementContentAsString method ?

Could you show me filter criteria in words not in code as it may confuse me?

 

If you want to filter data before data inported into Power BI,

You could use dynamic query parameter in the connection code in Advanced editor.

Power BI Desktop Query Parameters, Part 1

Dynamic Data Source based on parameter

 

If you need to filter data after data inported into Power BI,

You could follow the video:

Filter Data with Multiple Criteria using Power Query

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.