I have the following tables in a SSAS 2016 Tabular model:
- fact_ContactScore (inluding foreign key to dim_account and a measure TopContact)
- dim_Account (has accountname and parentaccountname)
An account can have multiple records in the fact_ContactScore where TopContact is either 1 or 0 and a parentaccount can have multiple accounts. The requirement is to create a measure to:
- return 1 for an accountname if the sum of TopContacts for that accountname >= 1
- return 1 for a parentaccountname if the sum of TopContacts for that parentaccountname >= 1
I tried several options including the following links but none of these worked: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/90330e64-89de-49f4-85e1-399d8a3fd48b/count-only-first-occurence?forum=sqlkjpowerpivotforexcel