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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |