Forum Discussion
aggarwal25
9 years agoFrequent Visitor
Sum column values based on another column
Hi All I have some data and I want to sum 'Translated Ampount' based on 'revenue Category' column and then be able to map it with the customer. PLease let me know how can I do that. Apprecaite an...
- Anonymous9 years ago
HI aggarwal25,
You can take a look at below formulas if it suitable for your requirement:
Calculate column:
Sum Group = CALCULATE(SUM('Table'[Translated Ampount]),FILTER(ALL('Table'),[Revenue Catagory]=EARLIER('Table'[Revenue Catagory])) )Measure:
Sum group 2 = var catagory=LASTNONBLANK('Table'[Revenue Catagory],[Revenue Catagory]) return CALCULATE(SUM('Table'[Translated Ampount]),FILTER(ALL('Table'),[Revenue Catagory]=catagory))Regards,
Xiaoxin Sheng
Anonymous
9 years agoNot applicable
HI aggarwal25,
You can take a look at below formulas if it suitable for your requirement:
Calculate column:
Sum Group = CALCULATE(SUM('Table'[Translated Ampount]),FILTER(ALL('Table'),[Revenue Catagory]=EARLIER('Table'[Revenue Catagory])) )
Measure:
Sum group 2 =
var catagory=LASTNONBLANK('Table'[Revenue Catagory],[Revenue Catagory])
return
CALCULATE(SUM('Table'[Translated Ampount]),FILTER(ALL('Table'),[Revenue Catagory]=catagory))
Regards,
Xiaoxin Sheng