Open chandankarpankaj opened 9 years ago
I'm sorry if I didn't understand you correctly, but is there any reason why you want to use a set expression instead of a member name even when there's only one member of the hierarchy in the slicer?
Currently, it tries to normalize the expression to strip any redundant set expressions, so when it finds a set with only one child member, it'll replace it with a plain member name.
By the way, this behavior is shared between column/row axes and the slicer. So, if you place hierarchies on either a column or a row axis, and deselect every members except for one, the resulting mdx will be similar to one in your example.
Please instruct me if I misunderstood the problem. There's chance it could be the case, as I'm not that knowledgable in MDX anyway.
Actually his issue is very simple. Crossjoin is always has sets. Pls refere https://msdn.microsoft.com/en-us/library/ms144816.aspx
What is happening in his case is that in the where clause CrossJoin({[Dataversion].[ACTUAL], [SCENARIO].[ALL]}) is being changed to CrossJoin([Dataversion].[ACTUAL], [SCENARIO].[ALL]). The '{}' operator is removed since one set is there in the CrossJoin. It should either remain CrossJoin({[Dataversion].[ACTUAL], [SCENARIO].[ALL]}) or CrossJoin should be removed for the where clause.
In above query: cross join on rows has format CrossJoin({SET1},{SET2}) but when we apply multiple members on slicers CrossJoin is used after 'WHERE' having different syntax CrossJoin(MEM1,MEM2)
there should be SET1 and SET2 instead of applying members for CrossJoin on slicer