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! Learn more
Struggling to understand why the below doesn't work? It gives me the sum of all carts instead of only the current month. Is there an explanation for this?
MTD Carts = CALCULATE(SUM(table_name[Carts]),FILTER(table_name,MONTH(table_name[date].[MonthNo]=MONTH(TODAY()))))
Thanks in advance.
Solved! Go to Solution.
Hi @KevinCP,
If I understand you correctly, the formula below should work in your scenario. ![]()
MTDCarts =
CALCULATE (
SUM ( table_name[Carts] ),
FILTER (
table_name,
YEAR ( table_name[date] ) = YEAR ( TODAY () )
&& MONTH ( table_name[date] ) = MONTH ( TODAY () )
)
)
Regards
Hi,
Here's my suggestion:
=SUM(table_name[Carts])
hope this helps.
Hi @KevinCP,
If I understand you correctly, the formula below should work in your scenario. ![]()
MTDCarts =
CALCULATE (
SUM ( table_name[Carts] ),
FILTER (
table_name,
YEAR ( table_name[date] ) = YEAR ( TODAY () )
&& MONTH ( table_name[date] ) = MONTH ( TODAY () )
)
)
Regards
This worked. Thanks!
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.