Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm looking for the sum of the absolute values of sums of categories.
In my dataset I have 4 categories. The value column is the SUM of the records. A simple ABS functin will return 10 in the total filed. However if you SUM up the absolutes that will return 60 just like in the last column, and this is what I am looking for.
I managed to find a solution using the SUMMARIZE function, however this is not feasable to implement for several reasons. So the question is, can this be done somehow with CALCULATE or some other functions?
Category Absolute =
VAR __table =
SUMMARIZE (
'Table',
'Table'[Category],
"Absolute", ABS ( SUM ( 'Table'[Value] ) )
)
RETURN SUMX ( __table, [Absolute] )
Here is the file attached for reference, the dataset is very simple 1 table with 3 columns and 11 rows : PowerBI File
Solved! Go to Solution.
Category Absolute =
SUMX(
// instead of distinct you can
// also use values
DISTINCT( Table[Category] ),
CALCULATE(
ABS( SUM( Table[Value] ) )
)
)
Category Absolute =
SUMX(
// instead of distinct you can
// also use values
DISTINCT( Table[Category] ),
CALCULATE(
ABS( SUM( Table[Value] ) )
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |