Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, i've been struggling a long time with this issue, and AI can't help me.
I'm in direct-query, so i can't do anything in modeling.
I have a facttable with values, and 1 dim-table with project - main-project - projecttype and a lot of other columns.
In the facttable i have values on projects, which i want to totalize on mainproject. But in my table i want to show the project AND the main-project. A small example, this is how i want to show it in my visual but with a lot more columns.
i can't seem to get it right with both the project and the mainproject in the visual.
Any suggestions?
Solved! Go to Solution.
Hi, Thanx for your reply.
With the sumx i don't get the 'total' row. What i need is:
I Finally got it with this formula. I think it is quite long, is it possible to make this formula shorter?
Amount(with total) =
IF(
HASONEVALUE(DimProject[Project]),
SUMX (
VALUES(DimProject[Project]),
IF (
SELECTEDVALUE(DimProject[Proj.Type]) = "Main",
CALCULATE(
SUM(FactAmount[Amount]),
REMOVEFILTERS(DimProject),
VALUES(DimProject[Main Project])
)
)
),
SUMX(
SUMMARIZE(
DimProject,
DimProject[Main Project],
"Amount", CALCULATE(SUM(FactAmount[Amount]))
),
[Amount]
)
)
Try
Amount =
IF (
SELECTEDVALUE ( 'Table'[proj type] ) = "Main",
CALCULATE (
SUM ( 'Table'[Amt] ),
REMOVEFILTERS ( 'Table' ),
VALUES ( 'Table'[Main Project] )
)
)
Great! This seams to work on the line, but how to get the right total in the Table?
Now its blank.
You can wrap it inside a SUMX
Amount =
SUMX (
VALUES ( 'Table'[Project] ),
IF (
SELECTEDVALUE ( 'Table'[proj type] ) = "Main",
CALCULATE (
SUM ( 'Table'[Amt] ),
REMOVEFILTERS ( 'Table' ),
VALUES ( 'Table'[Main Project] )
)
)
)
That doesn't seem to work. I've got a sample .pbix, but cannot upload it.
Hi, Thanx for your reply.
With the sumx i don't get the 'total' row. What i need is:
I Finally got it with this formula. I think it is quite long, is it possible to make this formula shorter?
Amount(with total) =
IF(
HASONEVALUE(DimProject[Project]),
SUMX (
VALUES(DimProject[Project]),
IF (
SELECTEDVALUE(DimProject[Proj.Type]) = "Main",
CALCULATE(
SUM(FactAmount[Amount]),
REMOVEFILTERS(DimProject),
VALUES(DimProject[Main Project])
)
)
),
SUMX(
SUMMARIZE(
DimProject,
DimProject[Main Project],
"Amount", CALCULATE(SUM(FactAmount[Amount]))
),
[Amount]
)
)
Hi @Roland74 ,
Thank you @Irwan and @johnt75 for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you for your understanding!
Check out the November 2025 Fabric 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!