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.
Nonessential
1 year agoFrequent Visitor
Do you want to create a measure or a calculated column? I assume you want a measure, if so you could do something like; Budget (Jan-Aug) = Calculate([Total Budget]), MonthNumber IN (1,2,3,4,5,6,7,8)). For this to work you would need the 'Total Budget' Measure which would just be a SUM of the Column you are performing the calculation on.
BJP99
1 year agoNew Member
I think I would prefer a calculated column for this. The Fields I have that would be based on this are Month and Amount. Month has the Month Names, and Amount has the Amounts associated with this.