DAX syntax to flag user based on its existence in bridge table

  • 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\User111795

    Domain\User119033

    Domain\User131333

    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

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply