Use the KPI [Measures].[Profit Margin] inside of SSAS:s tab named Calculation and then use it in my SSRS report and other user

I tried applying the source code in "Named set" or "calculated set", in SSAS, but it didin't work at all. I don't know how to apply the source code inside of SSAS.

*I'm using SQL server 2012
*Today, I have the source code in my SSRS report in the query designer view, inside of dataset, but I want the code to be inside of SSAS that I can allow users to use the same source code in their report.
*The report's data source is SSAS in my SSRS. MDX code only.
*The source code can be used for AdventureWorks.