Forum Discussion
Wrong sum
I have a shipment dataset that contains a Quantity (total ordered) and a Quantity Shipped column.
I have added a calculated column using DAX for Outstanding Quantity (Quantity - Quantity Shipped) and it is calculating correctly for individual rows.
For my selection of year and customer, the Sum of Outstanding Quantity is coming out to be wrong. I created a drill-through to see my rows and if you calculate the Sum of Outstanding Quantity manually, it is correct (correct outstanding quantity = 123). How do I reflect that correct amount on my line chart?
3 Replies
- Greg_DecklerCommunity Champion
Anonymous Not quite following this one. Seems like you need a measure but hard to know for sure. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. - AnonymousNot applicable
Hi Greg. I found this article by you - https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Used the methodology in the article but issue persists. This is my m_single -
This is my m_total -
Outstanding Qty (column 2) is a calculated column (Quantity - Quantity Shipped). Outstanding qty m_single and m_total are measures. I put them side by side for comparison. The correct outsanding qty for my selection here is = 3+5+15+25+30 = 78, the sum of the outstanding qty column. But both the m_single and m_total columns are giving me incorrect totals. Could you please point out if there are any mistakes in my m_single/m_total formulas?
- AnonymousNot applicable
Hi Anonymous,
Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng