I want to store the data in a cube having Input Currency, Output Currency, Month and Rate. So M01 column is Month1, M02 column is Month2 and so on until M18. But not as differnet measures. The measure is always Rate.

The second question is based on the first question:
When we make our forecast in the beginning of march, the first planning month is March. So M01 is 2018-03, M02 is 2018-04 and so on.
In Sepember e.g. the first planning month is September so M01 is 2018-09 and so on.
I have a second file which translates M01 to the month.
M Month
M01 2018-03
M02 2018-04
M03 2018-05
… …
M18 2019-08

This needs to be combined. At the end the real month (e.g. 2018-03) should be stored in dimension month.

PLEASE DON'T TELL ME TO CHANGE THE STRUCTURE OF THE ORIGINAL DATA. THIS IS FROM AN EXTERNAL SYSTEM WHERE I HAVE NO CHANCE FOR CHANGES.

Here is what you can do:
ETL -> TableNormalization for the first source you mentioned configured like:
- Normalization Field: Month
- Measure Value: #Value (this ist default)
- in the table at the end of the transform the first column contains M01, M02, M03 ...
- the second column also contains: M01, M02, M03 (according to the first column)
- Aggregation column could be "sum"

Next step:
Create a TableJoin joining the result and the table for translation of months. Where keys are "M" from the lookup table and "Month" from the result. Alternatively you can achieve this "translation" using a FieldTransform with Lookup-Function.