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

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

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