I have cube in which I want to pick max_date for which data is populated and store it in variable.

How can I do it using MDX.

The name of cube is Open_Closed.

I can do it easily pl/sql for fact table but is there any way of doing it in cube.

I am new to MDX and using SQL server 2016

Best reagrds

Please provide some examples and expected outputTechgeeks1
Examples of your attempts please?whytheq