Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a month&year column in a seperate table and cost in other table but i want to calculate sum of first 7 months cost.
could anyone can help me into this dax function. Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
This is my cost table:
This is my date table:
Model relationship between two tables:
Please try following DAX:
Sum cost = CALCULATE(SUM('Cost table'[Cost]),FILTER('Date table','Date table'[Month]<=7))
Sum of first 7 months cost:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks it worked
Hi @Anonymous ,
This is my cost table:
This is my date table:
Model relationship between two tables:
Please try following DAX:
Sum cost = CALCULATE(SUM('Cost table'[Cost]),FILTER('Date table','Date table'[Month]<=7))
Sum of first 7 months cost:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 20 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |