Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |