Forum Discussion
BJP99
1 year agoNew Member
Creating a Sum Based on Month
Hi, I have budget data by month. How do I go about creating a field that would add Months 1-8 of said data, ignoring the other 4 months. This data being budget data does not have actual dates t...
- Anonymous1 year ago
Hi BJP99
Please try the following Dax:(Jan - Aug) = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),MONTH('Table'[Date])>=1 && MONTH('Table'[Date])<=8 && 'Table'[Account]=EARLIER('Table'[Account])))Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BJP99
1 year agoNew Member
Hi, thank you for putting this together. Unfortunately it is giving me the same value for everything.
Nonessential
1 year agoFrequent Visitor
Hi, try
Jan - Aug =
CALCULATE(
SUM('Table'[Value]),
FILTER('Table','Table'[Month] IN {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug"}))
Or if you have Month Numbers;
Jan - Aug =
CALCULATE(
SUM('Table'[Value]),
'Table'[Month(number)>=1&&'Table'[Month(number)<=8]))