Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello everyone! This time I need you.
I need to calculate the minimum value among the absolute values of a column grouped by key, in order to put in that line the sum of the same column.
I try to explain, the data:
CHIAVE | DELTA_ADJ |
AAA | -444,471873 |
AAA | 380,175 |
BBB | -28323017,83 |
BBB | -80752,60925 |
I need to compute the sum of the column DELTA_ADJ grouped by CHIAVE, so:
-64,296873 |
-28403770,44 |
and put it in correspondence with the minimum value of the absolute value of each key, in this way:
|
EVERYTHING MUST BE DONE BY MEASURE, WITHOUT CALCULATED COLUMNS
THX,
BF
Solved! Go to Solution.
Hi @BeaBF
You can try https://we.tl/t-rWuYaQz0GU
MIN VALUE =
VAR AbsCurrentValue = ABS ( MAX ( Data[DELTA_ADJ] ) )
VAR ChiaveTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[CHIAVE] ) )
VAR GroupedBySum = SUMX ( ChiaveTable, Data[DELTA_ADJ] )
VAR AbsMinValue = MINX ( ChiaveTable, ABS ( Data[DELTA_ADJ] ) )
VAR Result = IF ( AbsCurrentValue = AbsMinValue, GroupedBySum, 0 )
RETURN
Result
Hi @BeaBF
You can try https://we.tl/t-rWuYaQz0GU
MIN VALUE =
VAR AbsCurrentValue = ABS ( MAX ( Data[DELTA_ADJ] ) )
VAR ChiaveTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[CHIAVE] ) )
VAR GroupedBySum = SUMX ( ChiaveTable, Data[DELTA_ADJ] )
VAR AbsMinValue = MINX ( ChiaveTable, ABS ( Data[DELTA_ADJ] ) )
VAR Result = IF ( AbsCurrentValue = AbsMinValue, GroupedBySum, 0 )
RETURN
Result
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 |
---|---|
14 | |
10 | |
10 | |
10 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |