0

Formula for measure filtered by a dimension

I have the fact and dimension tables below:

SourceType dimension

·         SourceType 1

·         SourceType 2

·         SourceType 3

·         SourceType 4

Event fact

·         Count of events

I would like to

1)      create a formula which calculates the count of events for all SourceTypes except for SourceType 3. 

2)      create a pivot table which uses the above created formula to display the count of events by SourceType, excluding SourceType 3

 

 

Count of events no sourcetype 3

SourceType 1

3

SourceType 2

4

SourceType 4

6

 

3)      use the formula with any other connected dimension

4)   if any other SourceTypes are added in the future, they would be included (in other words, need to use Except)

 

I created a list in Formulate as

{Except(AllMembers([SourceTypesTable].[SourceTypes]),[SourceTypesTable].[SourceTypes].[SourceType 3])}

 

And then used this list in another formula

Aggregate({[SourceTypeTable].[SourceType].*[272cf8c2-2350-4c51-bcd0-730258cbef37]},([measures].[EventsTable Events]))

 

This achieved #1 and #3 but not #2.

Thanks for the help.

Reply

null

Content aside

  • 4 days agoLast active
  • 23Views
  • 2 Following