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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to get Cube.MeasureProperty using MDX

Hi,

I have a BW cube for which I want to extract data using an MDX query.

What I am hving trouble with is to extract some measure properties.

In the query designer in Power BI, it would look like this

Sarritta_1-1645003416630.png

The code resulting from the above selection is as following:

Sarritta_0-1645003167139.png

If the "Unit of measure" property was a dimention property in stead of a measure property then the M function to be used would have been "Cube.AttributeMemberProperty" instead of "Cube.MeasureProperty".

 

The Cube.AttributeMemberProperty translates as following in MDX 

DIMENSION PROPERTIES [DimensionTechnicalName].[HierarchyTechnicalName].[PropertyTechnicalName]

 

But I could not find a way to translate the "Cube.MeasureProperty" in MDX.

 

Can anyone helpe me with my issue 🙃 ?

 

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Just bring the measure into Power Query then try right-clicking on a step in the Applied Steps pane and selecting the View Native Query option. If this option is not greyed out, it will show you how the M codes are translated into the native query of the data source. Give it a try!

Chris Webb's BI Blog: View Native Query Now Works For Analysis Services Data Sources

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors