Forum Discussion
Formula Cubeset values range with filter on secondary argument
Thanks for the links (I had them already). I did understand the coercition to String by default, hence why the following does it
....Currentmember.Properties('Key0') = '9999'On the other hand I was wondering if I misunderstood something re. "strongly typed" as the following does it as well (in our context):
...Currentmember.Properties('Key0', TYPED) = 9999 Anyway, let's see what Steven10970 has to say...
Yes, you are right, strongly typed works with numbers, there is no type conversion. On the other hand strongly typed with string
Currentmember.Properties('Key0', TYPED) = '9999'
also works.
I don't know what is behind. Long ago had some issues with that, don't remember which exactly. Since with string it always works, at least in my experience, I use apostrophes by default. Something like
Currentmember.Properties('Key0') = '9999'
most probably shall work in any case.
MDX is not what I do from day to day, good if touch it once per few months. With that it's bit hard to collect experience. At the same time with modifying in Excel cube connected from Power BI dataset it's new motivation to use MDX.
- LorenzoJan 12, 2023Silver Contributor
Working on something +/- close I remembered this old case. The FILTER option is close to yours:
- SergeiBaklanJan 12, 2023Diamond Contributor
Nice sample, thank you for sharing. Never used CROSSJOIN.
- LorenzoJan 26, 2023Silver Contributor
- LorenzoAug 13, 2022Silver Contributor
I had a similar challenge some time ago with authored SQL queries (from PQ) and the quotes were the solution. So, as you say, it's probably safe to use them in any case
Thanks again