Forum Discussion

vega's avatar
vega
Resolver III
8 years ago
Solved

SQL to DAX

I'm new to DAX and would like to do the following in DAX. Select a1.accountNumber From a1 Account, a2 Account Where a1.AccountNumber == a2.AccountNumber AND a1.AccountDescription != a2.AccountDe...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    8 years ago

    Hi vega,

     

    If I understand you correctly, you should be able to simply use the formula below to create new table to get number of AccountDescriptions for each AccountNumber.

    Table = 
    SUMMARIZE (
        Account,
        Account[AccountNumber],
        "Number Of Description", DISTINCTCOUNT ( Account[AccountDescription] )
    )
    

     

    Then you can apply a filter to show only accounts which have the same AccountNumber, but different AccountDescriptions on the report. :smileyhappy:

     

     

    Regards