cancel
Showing results for
Did you mean:

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

New Member

## total of expression on each row

Hello,

I would like to divide my table data with one specific row. So every table has a percentage according to row number 3. I already figured out how to show only totals for row 3 with an expression, however I can not divide every row by it, because all rows apart from row nr 3 are empty in the column ProcentVanTotaleOmzet. So I would like to know how to show the total on each row, or maybe store a variable somewhere and divide each row with that variable (being the total of row number 3).

The formula used for 'ProcentVanTotaleOmzet' :

ProcentVanTotaleOmzet = calculate(sum(FullTable[_Amount]);FullTable[PLSort]=3)

PLSort is equal to the rownumber in this case

Kind Regards

Maxim

1 ACCEPTED SOLUTION
MVP

Hi there,

Happy to help. So DAX calculates row by row, since this value is only on row 3, without the right context in your filter the other rows will be blank. This can be solved by including the ALL statement in your filter context shown below.

=
CALCULATE (
SUM ( FullTable[_Amount] ),
FILTER ( ALL ( FullTable ), FullTable[PLSort] = 3 )
)

This should now return -1,370,433 value for every row, allowing the division you'd need. Let me know if this works!

Reid Havens

Havens Consulting Inc.

2 REPLIES 2
MVP

Hi there,

Happy to help. So DAX calculates row by row, since this value is only on row 3, without the right context in your filter the other rows will be blank. This can be solved by including the ALL statement in your filter context shown below.

=
CALCULATE (
SUM ( FullTable[_Amount] ),
FILTER ( ALL ( FullTable ), FullTable[PLSort] = 3 )
)

This should now return -1,370,433 value for every row, allowing the division you'd need. Let me know if this works!

Reid Havens

Havens Consulting Inc.

New Member

Hi Reid Havens

The solution works perfectly.

Thank you very much!

Maxim Polderman

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.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### 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