Forum Discussion
Need Help With Dax
- 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
HI jgarden6
Create a measure as below
measure1 = CALCULATE(SUM('table'[column]),FORMAT('table'[date],"YYYY") = "2012")
- jgarden65 years agoFrequent Visitormeasure1 = 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 parsingCan you see what I'm doing wrong
- PhilipTreacy5 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.
- jgarden65 years agoFrequent Visitor
I had a syntax issue so I fixed that. It shows the summed value for 2012 but it is blank for all the other rows. I'm summing by year. When I do my divide (base year 2012 / each subsequent year , I get blanks for 2013 thru 2020 and that is because the 2012 sum is not shown for each year. Help again
- PhilipTreacy5 years agoSuper User