question

haggll avatar image
haggll asked

Simple Filter on Factles Fact in SSAS MDX... how to do ?

Hello everybody I'm new to SSAS and MDX and got a simple problem ... but no solution :-/ I have an Factless Fact table like this one: ![alt text][1] [1]: /storage/temp/978-charm_example.png The first thing I want to have was the Total Amount of all Distinct CharmiD. Therefore i used a simple Distinct Count on CharmID and got the total amount of 4 (ID 1,2,3 and 5) What I need next is the total amount of all Distinct Charm IDs with the CharmStatusID 1. Here i have no idea how to script this with MDX. The amount should be 2. In SQL it would be like: SELECT COUNT(DISTINCT [CharmID]) FROM [ROLAP].[dbo].[Fact_Charm] WHERE CharmstatusID = 1 I tried something like this in MDX, however it didn't work and I have no idea what i am really doing :-D CREATE MEMBER CURRENTCUBE.[Measures].DistinctSolvedCharms AS COUNT(FILTER( [Charm Status].[Charm Status ID].[Charm Status ID].Members, [Charm Status].[Charm Status ID].[Charm Status ID] = 1 )), VISIBLE = 1 ; Can someone help me ?
sql-server-2008ssasmdx
charm_example.png (6.7 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
SSAS/MDX expertise is fairly intermittent here. You might try the BIDN.com forums (they have both SSAS and MDX sections) - http://bidn.com/forums/
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.