Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
In the following image, How can i get the total for a new column as 1300 (Sum of 800+500) but individual row as 800, 500 group by header id (see image below)?
Thanks in advance!
Solved! Go to Solution.
Hey @sb991986 ,
for a measure and also for a calculated column the following formula should work:
New Column =
CALCULATE(
SUM( myTable[Revenue] ),
ALLEXCEPT( myTable, myTable[Header ID] )
)
Hi @sb991986
Try meausre as:
Measure =
var _sum=
SUMX(
FILTER(
ALL('Table'),
'Table'[Header ID]=MAX('Table'[Header ID])
),
'Table'[Revenue]
)
return
IF(
HASONEVALUE('Table'[Revenue]),
_sum,
SUM('Table'[Revenue])
)
Here is the output:
The pbix is attached.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hey @sb991986 ,
for a measure and also for a calculated column the following formula should work:
New Column =
CALCULATE(
SUM( myTable[Revenue] ),
ALLEXCEPT( myTable, myTable[Header ID] )
)
Hi,
In the above example, I would need total as 1300 but individual row as 800, 500 by header id & detail id. Thank you
calculate(sum(Table[revenue]), allselected(Table))
or
calculate(sum(Table[revenue]), all(Table))
Hi,
In the above example, I would need total as 1300 but individual row as 800, 500 by header id & detail id
@sb991986 , Try like
sumx(values(Table[Header ID]), calculate(sum(Table[revenue]), filter(allselected(Table), Table[Header ID] = max(Table[Header ID]))))
I tried your logic but it didn't work. Thank you fro your help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |