Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have a table where each row represents a VM and an application with a planned decommission date and cost, in essence it looks something like this:
VM | Application | Decommission Date | Decommission Cost |
VM01 | Print application | 01.01.2023 | $1000 |
VM02 | Print application | 01.01.2023 | $1000 |
VM03 | File server | 01.04.2023 | $800 |
VM04 | Email server | 01.07.2023 | $1500 |
What I would like to do:
What I tried:
TotalDecommissionCost = CALCULATE(SUM(Decommission Cost), ALL(Table)) - SUM(Decomission Cost)
This yielded wrong results.
Any suggestions welcome!
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, in my understanding, you want to calculate the sum of Decommission Cost when the date larger or equal to current date. In this way, 2023/1/1 will return 4300(1000+1000+800+1500), not 3300.
I this is the case, here's my solution.
Create a measure.
TotalDecommissionCost =
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Decommission Date] >= MAX ( 'Table'[Decommission Date] )
),
'Table'[Decommission Cost]
)
Get the result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, in my understanding, you want to calculate the sum of Decommission Cost when the date larger or equal to current date. In this way, 2023/1/1 will return 4300(1000+1000+800+1500), not 3300.
I this is the case, here's my solution.
Create a measure.
TotalDecommissionCost =
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Decommission Date] >= MAX ( 'Table'[Decommission Date] )
),
'Table'[Decommission Cost]
)
Get the result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
98 | |
80 | |
50 | |
48 | |
48 |