# Reports: Is TOTAL broken?

**URL:** <https://community.fibery.io/t/reports-is-total-broken/4915>\
**Category:** Get Help\
**Created:** [August 7, 2023, 5:05pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915 "2023-08-07T17:05:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [August 7, 2023, 5:05pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/1 "2023-08-07T17:05:10Z")

</div>

> ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/c/c588616e9a9f2a164998d7faffa422958f5078e5.png)

My interpretation of this description (and what would be useful) is that `TOTAL( MEDIAN([val]) )` would calculate the MEDIAN of val across all records in the source dataset.

If that was the case, I should be able to plot:

```auto
MEDIAN([val]) / TOTAL( MEDIAN([val]) )

```

and get a result for each row that is the row’s `MEDIAN(val)` scaled by the entire dataset’s `MEDIAN(val).` That would be quite useful, to normalize all the row values.

**But instead I get tiny values from the above formula – the largest is 0.017.**

So either `TOTAL()` is broken, or its description is wrong, or I don’t understand something else…

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [August 7, 2023, 5:15pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/2 "2023-08-07T17:15:34Z")

</div>

Can you share the report config and the database info so we can see some specifics?

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [August 7, 2023, 5:34pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/3 "2023-08-07T17:34:28Z")

</div>

Before I go to the trouble - am I correct in my interpretation of how TOTAL _should_ work?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [August 7, 2023, 5:41pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/4 "2023-08-07T17:41:32Z")

</div>

~~I believe so, but I’m not actually sure myself what the definition of ‘the entire dataset’ should be (e.g. when more than one db is in the source and or filters are being used)~~

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [August 7, 2023, 5:59pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/5 "2023-08-07T17:59:28Z")

</div>

After a quick experiment, it seems like TOTAL calculates the total of all the medians\*, not the median of all the entities:

![firefox_eHrasljZI3](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/6/60c442f20290e366ede99b9dcde29070ad1f7801.gif)

\*or whatever aggregation method you’re using

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [August 7, 2023, 6:02pm UTC](https://community.fibery.io/t/reports-is-total-broken/4915/6 "2023-08-07T18:02:05Z")

</div>

Yeah, that’s what I thought too. So either the TOTAL doc description is wrong, or TOTAL is broken.

So is there any way to normalize each row’s data by the MIN/MAX/AVG/etc (not SUM) of all rows?
