Forum Discussion
Total measures show wrong total when report is published
- 4 months ago
Hi dlkrdrf,
This is a common issue while working with SUMX() function, while it works perfect in few cases but it can change the row context while adding it to a matrix or table visuals, you can use inscope() function to cater this.
Measure =
IF(
ISINSCOPE(Table[Column]),
[Row Logic],
SUMX(
VALUES(Table[Column]),
[Row Logic]
)
)🌟 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 rajendraongole1 ,
thanks. The issue is only at total. No changes in relationships or data refresh. The measure with issue is
Any idea why the total behaves differently in desktop and in web?
Cheers!
Hi dlkrdrf - suggest you the stable approach should be when you are writing the measure for toal.
Measure T1 =
VAR _Period =
SELECTEDVALUE('Tbl1'[Period])
RETURN
IF(
_Period = "1",
CALCULATE(
SUM('Tbl2'[Column1])
)
)
However, if totals must aggregate correctly, even SELECTEDVALUE() can return BLANK at totals. Hope this helps.