David Power BI User on 15 Jan 2025 00:20:16
Can we please extend sempy to introduce an "evaluate_mdx" method that works in a similar way to "evaluate_dax"?
I happened to notice that the library is already working for many of our MDX queries. But it has some trouble with the "[Measures]" dimension. The MDX measures are excluded/removed from the column results, but all other columns from an MDX query are included in the results. I think the python code in this library is already 80% capable of supporting MDX, and I suspect the remaining changes that are needed on the [Measures] dimension would be fairly straightforward.
I've seen Fabric blogs that use the "evaluate_dax" for DMV queries as well. The DMV queries and MDX queries aren't explicitly rejected by the library. Nor are these query languages explicitly unsupported in the docs.
It is sort of a tease that the method works so well for DMV and MDX, yet these scenarios are unlikely to be supported. We need methods which will be future-proof, and won't be expected to break in a newer version of the Fabric platform!
(Alternately, please consider open-sourcing sempy, or the underlying components of sempy, so that customers can patch this bug ourselves.)