The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |