The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance 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.
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |