Forum Discussion
Slicer With Selected Terms AND'd Not OR'd
You therefore need to write a measure that returns a non blank result when your pattern is matched. In your sample data, something like this
=if(distinctcount(table[hashtagkey])=distinctcount(table[tweetkey]),1)
Thank you for your help.
As you suggest, I create Distinct Count of Hashtag Key measure but I can't get how many numbers of hashtag selected on attribute slicer while creating them.
So I create Matching1, Matching2, Matching3 measure to check distinct count value as a temporary solution.
You suggest to check equality of distinct counts of HashtagKey and TweetKey. But should be HashtagKey and TweetHashtagKey ? If I could check Number of Hashtag Selected = Distinct Count of Hashtag Key, one measure would be enough? Is there any way to get the count of selected dimensions when writing measure, or any ideas on these screenshot to make it done with one measure?
Thanks,
My measures are listed as follows;
CREATE MEMBER CURRENTCUBE.[Measures].MatchingAll
AS iif([Measures].[Tweet Hashtag Count] > 0, iif([Measures].[Hashtag Key Distinct Count] = [Measures].[Tweet Hashtag Count], 1, NULL), NULL),
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].Matching1
AS iif([Measures].[Hashtag Key Distinct Count] = 1, 1, NULL),
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].Matching2
AS iif([Measures].[Hashtag Key Distinct Count] = 2, 1, NULL),
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[Measures].Matching3
AS iif([Measures].[Hashtag Key Distinct Count] = 3, 1, NULL),
VISIBLE = 1;
- MattAllington9 years ago
Community Champion
Those measures are not written in DAX. It looks like MDX to me.
I have now re-read the previous post and I misunderstood what you wanted. You could try adding 2 slicers and selecting one of the options in each slicer