Forum Discussion
Measures Calculating Incorrectly at Line Level
- Anonymous4 years ago
AlexisOlson I was finally successful and was able to create the proper sum per item using this measure:
Current Qty = SUMX(SUMMARIZE(vw_TubingShortage_InventoryUsage,[Item Name],[CurrentQty]),[CurrentQty]) - 4 years ago
It's doesn't make sense to me why that would necessarily be the "correct" sum but you could do something like this:
SUMX ( SUMMARIZE ( Table1, Table1[Item Name], Table1[Current Qty] ), Table1[Current Qty] )
Thanks.
What's happening is that in your first table, it's grouping distinct Item Name and Current Qty combination. Some of these combinations appear multiple times though, which is why they add up to a larger number than you expect.
If you add DATECHG to the table, it becomes more obvious what's happening.
AlexisOlson thank you.
So how would I solve the issue of summing the amounts to reflect the correct value regardless of the date? The sum should be 130.
Thank you.
- AlexisOlson4 years agoSuper User
It's doesn't make sense to me why that would necessarily be the "correct" sum but you could do something like this:
SUMX ( SUMMARIZE ( Table1, Table1[Item Name], Table1[Current Qty] ), Table1[Current Qty] ) - Anonymous4 years agoNot applicable
AlexisOlson I was finally successful and was able to create the proper sum per item using this measure:
Current Qty = SUMX(SUMMARIZE(vw_TubingShortage_InventoryUsage,[Item Name],[CurrentQty]),[CurrentQty])