cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Get correct sum of a measure in table

I have a measure that is not showing the correct total in the table. This measure is created from other measures and those measures are created using more measures.

Extract Loss = MeasureB - MeasureA

How do I get the total to be accurate?

or what I really want is to show the "percent of grand total" - which should be -598.66 / -1708.58 = 35.04%.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I got it working by using this:

``````SUMX(
GROUPBY(Table, Table[Column], Table[Column2]),
Measure1 - Measure2
)``````
3 REPLIES 3
Anonymous
Not applicable

I got it working by using this:

``````SUMX(
GROUPBY(Table, Table[Column], Table[Column2]),
Measure1 - Measure2
)``````
Super User

@Anonymous , it should work, Using the columns/field in visual

New M1= Sumx(summarize(Table, Table[Column], "_1",[MeasureB] - [MeasureA]) , [_1])

for % fo total  = divide([New M1], calculate([New M1]), allselected()) )

Anonymous
Not applicable

what is "_1" for?

Here is what I tried and it did not work:

``````Extract Loss total by group =
VAR m1 =
SUMX (
SUMMARIZE (
Table,
Table[Location],
Table[Brand],
Table[ItemNo],
"_1", [Theoretical] - [Actual]
),
[_1]
)
RETURN
DIVIDE ( m1, CALCULATE ( m1, ALLSELECTED () ) )``````

When I add this to my table, every row shows 100%

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.