Forum Discussion

Datafruit's avatar
Datafruit
Icon for Helper I rankHelper I
5 years ago
Solved

Measure to sum unique values in column with duplicate values based on a another column

Hi guys   Pretty new to PBI and have a problem with creating a measure, that does what I need it to do. Basically I have a table where I have a bunch of data and I need to sum "Transaction fee" col...
  • Greg_Deckler's avatar
    5 years ago

    Datafruit Perhaps:

    Measure =
      VAR __Table = 
        DISTINCT(
          SELECTCOLUMNS('Table',"fee",[transaction_fee],"nr",[customer_nr],"country",[country])
        )
    RETURN
      SUMX(__Table,[fee])