How to convert mdx query to sql query automatically?

I want convert mdx query used to generate the cube report into sql query which can be used retrieve same report from database.please help.

post the query

SUM(PeriodsToDate([Time_Period].[Time_Period].[Year],[Time_Period].[Time_Period].CurrentMember),[Measures].[Rev_Act_USD])

Post title: How to convert mdx query to sql query automatically?

To the best of my knowledge, there is no way to do the conversion automatically.