Forum Discussion
Datafruit
Helper I
5 years agoMeasure 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...
- 5 years ago
Datafruit Perhaps:
Measure = VAR __Table = DISTINCT( SELECTCOLUMNS('Table',"fee",[transaction_fee],"nr",[customer_nr],"country",[country]) ) RETURN SUMX(__Table,[fee])
Greg_Deckler
Community Champion
5 years agoDatafruit Perhaps:
Measure =
VAR __Table =
DISTINCT(
SELECTCOLUMNS('Table',"fee",[transaction_fee],"nr",[customer_nr],"country",[country])
)
RETURN
SUMX(__Table,[fee])- Datafruit5 years ago
Helper I
Greg_Deckler Works, thank you! 🙂
- Anonymous1 year agoNot applicable
This solution looks like it will fit for my data issues as well, however I cannot get correct syntax to work for the Measure. Can you help with the VAR command and when we say "Table" are we referring to the table with my data or some temporary table?