Forum Discussion
jgarden6
5 years agoFrequent Visitor
Need Help With Dax
I need help with Dax. I'm new to Dax so excuse my lack of knowledge. I have data that I want to sum a column for each year. I have data for years 2012 through 2020. I wnat a measure that shows th...
- 5 years ago
Hi jgarden6
Download sample PBIX with measures and data shown below.
I'm not sure what your data looks like - are you storing the year as text, a number or as a date?
But if your Year column is numerical and just holds the year then try this measure
Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'), 'Table'[Year] = 2012))If you have a column of dates then use this measure
Measure 2 = CALCULATE(SUM('Table2'[Value]),FILTER(ALL('Table2'), YEAR('Table2'[Date]) = 2012))Regards
Phil
jgarden6
5 years agoFrequent Visitor
measure1 = CALCULATE(SUM('Exported_Data'[Taxable Value],FORMAT('Exported_Data'[date],"YYYY") = "2012")
I must be doing something wrong. I'm getting a message "Too many arguments...something abour parsing
Can you see what I'm doing wrong
PhilipTreacy
5 years agoSuper User
Hi jgarden6
You're missing the closing ) for SUM
measure1 = CALCULATE( SUM('Exported_Data'[Taxable Value] ) , FORMAT('Exported_Data'[date],"YYYY") = "2012")
Regards
Phil
- jgarden65 years agoFrequent Visitor
That fixed the measure but I still don't get that value to show up on the other rows for the year. What I need to do is to divide each year that is summed on a column divided by the base year (2012) summed on the same variable. This will give me the growth for each year from the base year 2012.