incorrect row totaling table

Forum home » Delegate support and help forum » Microsoft Power BI training and help » Incorrect Row Totaling in Table Visualisation | Forum

Incorrect Row Totaling in Table Visualisation | Forum

resolvedResolved · Low Priority · Version 2016

Incorrect Row Totaling in Table Visualisation

Hi,

So i have a Table visual based off a calculated Measure(called = 'Measure D/S') which is incorrectly summing the rows within the table visualisation.

What is the best way to fix this issue when 'Measure D/S' is dividing two different measures = (Measure D)/Measure S). I have done a bit of googling and as my 'Measure D/S' is not referencing a table I am unable to get the 'Hasonevalue' DAX formula to work.


Context for problem:

Measure D (Table 1):
Item 1 = 200 units
Item 2 = 150 units
Item 3 = 50 units
Total = 400 units

Measure S (Table 2):
Item 1 = 63%
Item 2 = 66%
Item 3 = 65%
Total (based off of Table visual) = 64%


Measure D/S (Measure D / Measure S):
Table Visual: (values rounded up)

Item 1 = 317
Item 2 = 227
Item 3 = 77

Correct Total should be = 621
Incorrect Total shown in Table Visual= 625

How do i make my Measure 3 within the table visual equal the correct total shown above. This is a simplified version, the incorrect totals are more spread than this.



Please let me know if you need any more clarification for the above problem.

Thanks in advance!

Akash

RE: Incorrect Row Totaling in Table Visualisation

Hi Akash,

Thank you for your forum question. My name is Ron and I am one of STL's trainers.

Akash, I tried to replicate the data you used in your example and I get the 621 as a result.

I created both a new column so you can see the values and created a measure that also gave 621 as a result.

I attached a workbook and a Power Bi report based on your sample data which shows you the results.

I have no idea why your visuals in Power Bi give you the wrong result.

If Power Bi gives you the wrong result in the visual I would go back and have a good look at the source data. Are there maybe additional values in the source data that you were not aware of. Are there values in Table A that might have no related records in table B?. Are there duplicate values in any of the tables Because I am almost sure that that is the reason for the odd result.

Please reply to this message if you have anything additional to add and more importantly if you do find out the reason for the error. Please let us know that too?

I hope this answers your query.

Kind regards

Ron Oldeboom
Learning and Development Consultant at STL -training

Please double check

Attached files...

TestMeasure.pbix
test.xlsx

RE: Incorrect Row Totaling in Table Visualisation

Hi Akash,

I just realised you are rounding up. The rounding up on each individual row may be the issue.

Try rounding the end result rather than rounding up each individual row because that might be where the issue lies. Instead of using roundup() try formatting the measure to display 0 decimals and see if it changes your end value. Mine was altered to 622 which is the accurate rounded value based on your data.

Please let me know if that was the issue.

Kind regards

Ron Oldeboom

RE: Incorrect Row Totaling in Table Visualisation

Hi Ron,

Apologies, i may have been a little less clear in the initial example.

The %'s in measure 2 are formatted to 0 decimal places in the 'measure tools', should i instead apply this to the measure it self through a Dax function?

As my data values are a lot larger and the %'s are less clean (e.g. 0.732445 - but i format in the measure tools to 2 d.p). The % measures in the above examples are based on calculating the 'Share %s' from a data set.

Thanks for your help! I'll let you know if i am still struggling.

Thanks,
Akash

RE: Incorrect Row Totaling in Table Visualisation

Hi Akash,

Thank you for your reply. I appreciate that the datasets are much larger than just 3 rows of data. As long as the original percentages from the data set are not formatted to 0 decimals for each row you should be fine. So don't manipulate the source percentages. Do the calculation using the source percentages and format the end result to 0 decimals as you did. I hope that makes sense.

Good luck and if still not correct I might ask you to send a bigger sample of data for me to look at.

Thanks Akash

ind regards

Ron

Mon 13 Jul 2020: Automatically marked as resolved.

 

Training courses

 

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Power BI tip:

Query Editor Shortcuts

Ctrl + E: Open or close the Query Editor.
Ctrl + F: Find within the Query Editor.
Ctrl + H: Replace within the Query Editor.
Ctrl + D: Duplicate selected query.
Ctrl + ; (semicolon): Insert a step to create a custom column.
Ctrl + M: Enter the formula bar for the selected step.

View all Power BI hints and tips


Server loaded in 0.05 secs.