Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
i have to sum days along with month like this
day, sumByDay, SumByMonth
01/01/2022 10, 25
02/01/2022 12, 25
03/01/2022 3 , 25
01/02/2022 9 , 11
02/02/2022 2 , 11
My problem is the filter context
when i use remove all
its give me all dates but i need only for that month
how can i achive that?
Thanks alot
Solved! Go to Solution.
A seemly simple solution, but the mechanism under the hood is complex enough.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks CNENFENL
Looks good.
Hi @Urielpc ,
Please try:
Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR([Day])=YEAR(MAX('Table'[Day])) && MONTH([Day])=MONTH(MAX('Table'[Day]))))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
A seemly simple solution, but the mechanism under the hood is complex enough.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Make sure that you have a Year Month column on your date table then use
Sum by Month =
var currentMonth = SELECTEDVALUE( 'Date'[Year Month])
return CALCULATE( [Base measure], REMOVEFILTERS('Date'), 'Date'[Year Month] = currentMonth )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |