cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Regular Visitor

## Totals showing as 0 instead of the sum

Hi, I am having issued with my formula not summing up at the Total and Subtotal level. I would like to show me the sum in the subtototals and totals instead of Zeros (Because it is doing it linear)

1 ACCEPTED SOLUTION
Community Support

Hi @svallejo ，

According to your description, I create a sample.

RR23 and Average RR23 are all measures.

``RR23 = MAX('Table'[Sales])``
``Average RR 23 = MAX('Table'[Cost])``

Here's my solution, create a measure.

``````Measure =
SUMX (
'Table',
"Diff",
IF ( [RR23] > [Average RR 23], [RR23] - [Average RR 23], 0 )
),
[Diff]
)
``````

Get the correct result.

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.

4 REPLIES 4
Community Support

Hi @svallejo ，

According to your description, I create a sample.

RR23 and Average RR23 are all measures.

``RR23 = MAX('Table'[Sales])``
``Average RR 23 = MAX('Table'[Cost])``

Here's my solution, create a measure.

``````Measure =
SUMX (
'Table',
"Diff",
IF ( [RR23] > [Average RR 23], [RR23] - [Average RR 23], 0 )
),
[Diff]
)
``````

Get the correct result.

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.

Super User

pls try this

opportunity 2= IF ( ISFILTER (category), Opportunity, 0)

Proud to be a Super User!

Regular Visitor

Hi,
it is not working. I am using the following formula but it does not seems to be calculating correcly.

VAR VendorData =
SUMMARIZE(
'1P_MainDataSet',
'1P_MainDataSet'[Vendor],
"AvgReturnAmt", [Returns \$@AVG]-[Return Amount]
)
RETURN
SUMX( VendorData, [AvgReturnAmt] )

This is how it looks:

what I essentially need is for the opportunity column to be = Return amount - Return \$@ avg... but it is not doing it.

Super User

could you pls provide the sample data and expected output?

Proud to be a Super User!

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors