This worked:
=CUBEVALUE("ThisWorkbookDataModel","[Measures].[Sum of newrev]","[public dates_d].[moy].["&M$22&"]","[model].[type].&[Technology]",
CUBESET(
"ThisWorkbookDataModel",(
D24,
D25)
)
)
where d24 and d25 are cubemember functions. Pasting them in didn't work...