Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I am trying to use SUMX with Summarize however my result is not correct .Below it is a example of the data.
The expected result is to have amount =500 on line 4 , however my measure gives me 1000 as result.
MY Measure=Calculate(SUMX(SuMMARIZE(Table, Facture,Prod ID,Amount),SUM(Amount), Filter (table(And(MAX Prod ID= PROD ID, MAX(Lineid))))
Many Thanks in advance
| MAX Prod ID | Facture | Amount | Prod ID | Line ID |
| 14 | INV1 | 200 | 1 | 1 |
| 14 | INV1 | 300 | 2 | 2 |
| 14 | INV1 | 500 | 14 | 3 |
| 14 | INV1 | 500 | 14 | 4 |
Solved! Go to Solution.
@macwhe ,
First create one Calculated column to make Max of Line ID like below:
Max LineID = IF(MAX('Table'[Line ID])='Table'[Line ID],1,0)
Then create your final measure to get the expected result:
@macwhe ,
First create one Calculated column to make Max of Line ID like below:
Max LineID = IF(MAX('Table'[Line ID])='Table'[Line ID],1,0)
Then create your final measure to get the expected result:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!