Forum Discussion
SUM different row
- Anonymous6 years ago
Hi,
Sorry for the late reply, I was in vacation.
I'm not sure if this is the right method by the admin to mark a reply as solved, that's definetly NOT the solution that I was looking for. Having admin rights doesn't mean you can do whatever you want...
The right way that I did is:
1) Pivot those rows into columns in Power BI Queries with language M.
2) Create a calculated column to sum up the new pivoted columns.
3) Unpivot those columns into rows.
This wroked great !
Hi epappu,
In the table itself.
Visual function are used for sum only, the issue is that I need to use some soustraction and divide formula as well.
Thanks
Hi Sabri -
I tried to do a similar dataset in a local pbi file, and please see the screengrab below. I think this will help you get your totals irrespective of how many rows you have starting with A or B.
If this helped you, please accept this as solution.
Regards
- Anonymous6 years agoNot applicable
Thank you for your reply, the table of my OP was an exemple, if I change the name as below, I'm sure if this would work ?
Col1 Value Total External Revenue US 100 Internal Revenue US 200 External Revenue GBP 300 Internal Revenue GBP 400 Global Revenue US Global Revenue GBP - Anonymous6 years agoNot applicable
Hi Sabri,
Yes, it should work if you change the formula like this...
Regards- Anonymous6 years agoNot applicable
Hi Epappu,
My mistake, yes it works. However I noticed if I add a month column as below, It will sum up all the months. Is there a way to calculate by month ? a FILTER inside another filter ?
Col1 Month Value Total External Revenue US Jan 100 External Revenue US Feb 150 Internal Revenue US Jan 200 Internal Revenue US Feb 250 External Revenue GBP Jan 300 External Revenue GBP Feb 350 Internal Revenue GBP Jan 400 Internal Revenue GBP Feb 450 Global Revenue US Jan Global Revenue US Feb Global Revenue GBP Jan Global Revenue GBP Feb Sorry to bother you but I'm still learning the logic behind Dax language. Thanks again !