Some Excel functions that can pull data directly from the PowerPivot datamodel (basically like a super lightweight RDBMS inside Excel designed to take your pivot tables to the next level) require you to enter strings of MDX code (see function in first image, "[Measures].[...]" is MDX):
https://www.thefpandaguy.com/microsoft-excel/hidden-gem-cube-functions-an6bx#:~:text=The%20purpose%20of%20the%20cube,directly%20in%20the%20Excel%20grid.
For example, the "MDX" package in Package Control (one other MDX package I know of, it's called "eazyBI MDX", not sure which is more relevant here) would format the contents of this string as:

Some Excel functions that can pull data directly from the PowerPivot datamodel (basically like a super lightweight RDBMS inside Excel designed to take your pivot tables to the next level) require you to enter strings of MDX code (see function in first image, "[Measures].[...]" is MDX):
https://www.thefpandaguy.com/microsoft-excel/hidden-gem-cube-functions-an6bx#:~:text=The%20purpose%20of%20the%20cube,directly%20in%20the%20Excel%20grid.
For example, the "MDX" package in Package Control (one other MDX package I know of, it's called "eazyBI MDX", not sure which is more relevant here) would format the contents of this string as: