Forum Discussion
Row wise calculation
- 9 months ago
Hi prasadpatil020,
The problem is not the SUMX itself but how the row context / filters are evaluated (and sometimes duplicate rows) which makes the MAX() return unexpected values or cause double-counting.
Try below DAX, it creates a virtual table and then sums up the data.
@@test =
SUMX(
SUMMARIZE(
'Order Level Details',
'Order Level Details'[Order No],
"OrderVal", MAX('Order Level Details'[Tot. Order Value Gross])
),
[OrderVal]
)🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
Hi prasadpatil020,
The problem is not the SUMX itself but how the row context / filters are evaluated (and sometimes duplicate rows) which makes the MAX() return unexpected values or cause double-counting.
Try below DAX, it creates a virtual table and then sums up the data.
@@test =
SUMX(
SUMMARIZE(
'Order Level Details',
'Order Level Details'[Order No],
"OrderVal", MAX('Order Level Details'[Tot. Order Value Gross])
),
[OrderVal]
)
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
Thank You so much for quick responce grazitti_sapna 🤗