Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hey 🙂
I have a table with the following structure:
| Sector | Budget | Year |
| AAA | 6.000 | 2021 |
| BBB | 13.000 | 2021 |
| CCC | 8.000 | 2021 |
I also have a measure that calculates the total sum of expenses for each sector (this data coming from another table).
I want a measure that do the Budget - Total Spent, for each Sector, but I don't know how to subtract the value of a column by a measure.
Can someone help me?
Solved! Go to Solution.
Hi @Anonymous
I think you can subtract the value of a measure by the value of a column by another measure.
Here I build a sample.
Budget Table:
Expense Table:
Expense measure:
Measure =
CALCULATE (
SUM ( Expense[Expense] ),
FILTER (
Expense,
Expense[ Year] = MAX ( Budget[ Year] )
&& Expense[Sector ] = MAX ( Budget[Sector ] )
)
)Expense =
SUMX(Budget,[Measure])
Subtract measure:
Result = SUM(Budget[Budget ]) - [Expense]
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Hi @Anonymous
I think you can subtract the value of a measure by the value of a column by another measure.
Here I build a sample.
Budget Table:
Expense Table:
Expense measure:
Measure =
CALCULATE (
SUM ( Expense[Expense] ),
FILTER (
Expense,
Expense[ Year] = MAX ( Budget[ Year] )
&& Expense[Sector ] = MAX ( Budget[Sector ] )
)
)Expense =
SUMX(Budget,[Measure])
Subtract measure:
Result = SUM(Budget[Budget ]) - [Expense]
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
@Anonymous ,
You need to have a common sector and year/date table , Joining back with these tables
Using the common table you can analyze data together (Measure from both tables)
Sector Table = distinct(union(distinct(Budget[Sector]),distinct(Actual[Sector])))
Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19
In case your data are at a different level
Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.