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! Request now
Hi,
CALCULATE(
SUMX(
SUMMARIZE(
SiteName,
SiteName[SiteName],
"Site Cost",
SUMX(
SUMMARIZE(
AreaTypeName,
AreaTypeName[AreaTypeName],
"Cost",
SUMX(
SUMMARIZE(
Cost_Categories,
Cost_Categories[CostCategoryName],
"Spends", SUM(Actual[Cost]) - SUM(Budget[Cost])
),
[Spends]
)
),
[Cost]
)
),
[Site Cost]
),
NOT(Cost_Categories[CostCategoryName] IN {"Subcon","Material", "Controller"})
)
Solved! Go to Solution.
@duybachhpvn , It is possible that you take actual fact in summarize and add all dimension columns
like
CALCULATE(
SUMX(
Addcolumns( SUMMARIZE(
Actual,
SiteName[SiteName],
AreaTypeName[AreaTypeName],
Cost_Categories,
Cost_Categories[CostCategoryName],
),
"Spends", SUM(Actual[Cost])
), [Spends])
NOT(Cost_Categories[CostCategoryName] IN {"Subcon","Material", "Controller"})
)
@duybachhpvn , It is possible that you take actual fact in summarize and add all dimension columns
like
CALCULATE(
SUMX(
Addcolumns( SUMMARIZE(
Actual,
SiteName[SiteName],
AreaTypeName[AreaTypeName],
Cost_Categories,
Cost_Categories[CostCategoryName],
),
"Spends", SUM(Actual[Cost])
), [Spends])
NOT(Cost_Categories[CostCategoryName] IN {"Subcon","Material", "Controller"})
)
Hi @amitchandak , sorry I simplified my example, I have updated it. The calculation is actually from Actual and Budget tables, therefore I cannot put the Actual Fact in the SUMMARIZE. Do you know how to do in this case?
"Spends", SUM(Actual[Cost]) - SUM(Budget[Cost])
Hi @duybachhpvn ,
In order to provide you a suitable solution, could you please share some sample data in the table Cost_Categories, SiteName , AreaTypeName, Actual and Budget? Is there any relationship created among these tables? What's your final expected result? Please provide the calculation logic and special examples screenshot. Thank you.
Best Regards
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |