Forum Discussion
Anonymous
8 years agoNot applicable
Help with something super simple
I am just learning, but want to create year over calculations. Data looks just like this Model Year Value black 2017 5 blue 2016 ...
- 8 years ago
Hi Anonymous,
For example in excel, it is a simple =SUMIF(B:B,"2017",D:D). Give me the sum of column D, but only if Column b contains the data for 2017.The formula below to create a measure is for your reference. :smileyhappy:
Sales 2017 = CALCULATE(SUM('Table1'[Value]),FILTER('Table1','Table1'[Year]=2017))Note: You'll need to replace 'Table1' with your real table name.
Regards
Anonymous
8 years agoNot applicable
That is not helpful at all. Can anyone please show me how to write a dax forumal that sums up a column, but only if another column contains a certain data point. For example in excel, it is a simple =SUMIF(B:B,"2017",D:D). Give me the sum of column D, but only if Column b contains the data for 2017.
v-ljerr-msft
8 years agoMicrosoft Employee
Hi Anonymous,
For example in excel, it is a simple =SUMIF(B:B,"2017",D:D). Give me the sum of column D, but only if Column b contains the data for 2017.
The formula below to create a measure is for your reference. :smileyhappy:
Sales 2017 = CALCULATE(SUM('Table1'[Value]),FILTER('Table1','Table1'[Year]=2017))
Note: You'll need to replace 'Table1' with your real table name.
Regards