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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Dear Community,
I have a simple issue using "sum"...
I have a table with multiple lines, linked an id/category but when I try to have the total cost per category, here which is supposed to be 300 for the category "product", Power bi is showing the total cost so 600. I have added the grey column just to let you the result shown by powerbi:
I have tried to create a SUMX(Cost, cost(jan) + cost(feb)+ ...) but I end up with the same result.
If any one have a simple trick, that will be great.
thanks,
Kasiop
Hi,
I'm assuming you are creating a measure, try this instead
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks a lot, I tried to implement your solution but I am not sure what I am doing wrong but the formula still show me the "wrong" total cost:
Hi @Kasiop
Please try the following
SUMX(
VALUES(Cost[Type]),
cost(jan) + cost(feb)+ ...)
)
If this does not help please provide a piucture of your data model with relevant columns as well as how your current result looks in Power BI.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
Hi,
I didnt manage to make your formula works...
All my data are in one column called CL:
And here is the powerbi visual:
Hi,
I believe this should work, based on the table you posted.
SUMX(
'CL',
Jan + Feb + Mar + Apr +...
)
Alternatively, I will advise you to unpivot the month columns and have all Months in a single column and values in another column. That way, SUM(Values) will just work.
htanks, but still not working :
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 105 | |
| 45 | |
| 32 | |
| 24 |