Hello Experts,
I am implementing Security in SSAS Tabular Model. In it, I am running into scenario, where I want a user to be "flagged" dynamically based on its existence in a bridge table.
Below is the scenario:
1. I have UserDimension table:
UserAlias
Domain\User1
Domain\User2
Domain\User3
2. I have Bridge table:
UserAlias FinGeoKey
Domain\User1 11795
Domain\User1 19033
Domain\User1 31333
3. With this, I want to create DAX expression, which should dynamically flag record as 0 or 1, based on its existence in Bridge table.
Thus, I should get flag of 1 for User1 and
flag of 0 for User2 & User3.
I tried below expression, but no luck:
Flag:=IF( CALCULATE( COUNTROWS( BridgeTable ), FILTER( BridgeTable, BridgeTable [UserAlias]=USERNAME()) ) > 0, 1, 0)
Any ideas on how to proceed? Please let me know if I missed anything.
Thanks,
Prasad
I am implementing Security in SSAS Tabular Model. In it, I am running into scenario, where I want a user to be "flagged" dynamically based on its existence in a bridge table.
Below is the scenario:
1. I have UserDimension table:
UserAlias
Domain\User1
Domain\User2
Domain\User3
2. I have Bridge table:
UserAlias FinGeoKey
Domain\User1 11795
Domain\User1 19033
Domain\User1 31333
3. With this, I want to create DAX expression, which should dynamically flag record as 0 or 1, based on its existence in Bridge table.
Thus, I should get flag of 1 for User1 and
flag of 0 for User2 & User3.
I tried below expression, but no luck:
Flag:=IF( CALCULATE( COUNTROWS( BridgeTable ), FILTER( BridgeTable, BridgeTable [UserAlias]=USERNAME()) ) > 0, 1, 0)
Any ideas on how to proceed? Please let me know if I missed anything.
Thanks,
Prasad