but instead of null I want it to be upto current date:
In a cube calculation / MDX queries you can use VBA = "Visual Basic for Applications", same as in Word/Excel and it's possible to use the complete Excel library.
With that you can "calculate" a specific day, for example yesterday:
CREATE STATIC SET CURRENTCUBE.[Yesterday]
AS StrToSet('{[Calendar].[Hierachy].[Date].&[' + VBA!FORMAT(VBA!DATEADD("d", -1, VBA!NOW()), "yyyy-MM-dd") + 'T00:00:00]}')
,DISPLAY_FOLDER = 'Calendar Range';