Forum Discussion
DAX to MDX
Hello everyone. I need to connect my Power BI report to a SSAS cube, but in order to do this I need to translate my measures from DAX to MDX. Now, is there an automatic way of doing this? After years I've been working in DAX is not that easy to me. My DAX query is the following:
CALCULATE(AVERAGEX(DIMTABLE,[Amount]),FILTER(ALL(Group),[Amount]>0),DIMTABLE[Group] IN VALUES(DIMTABLE[Group]))
Basically, is a group average which keeps aggregated even if I add more granularity (like ID's) to the query.
Any suggestions?
3 Replies
- v-juanli-msft
Community Support
Hi BossCo
When connecting to SSAS, you could create measures with DAX in Power bi.
Even it is live connection, it supports to create measures on Power bi side with DAX.
You could also create measures with MDX on SSAS side, after connecting to power bi, it transform measures from SSAS into measures on Power BI.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-ssas-multidimensional
https://www.wiseowl.co.uk/blog/s1450/dax-versus-mdx.htm
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.- BossCo
Helper II
Hi, maybe I didn't mention that my model is multidimensional, that's why I need to connect it to a cube. How can I write DAX query to create measures in Power BI? Am I missing something?
What I'm actually trying to do is to write MDX queries on SSAS side, but it's really hard for me since I've just started learning it.Thanks
- v-juanli-msft
Community Support
Hi BossCo
Reference:
https://docs.microsoft.com/en-us/dax/
You could show your detailed requirement so we can help you further.
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.