Forum Discussion
Sum by Value in other Column
- 9 years ago
Hi gregor,
Then you add [income] column in ALLEXCEPT function.changed_Column = CALCULATE(SUM(Test1[Column D (Value)]),ALLEXCEPT(Test1,Test1[Column A (ID-Number)],Test1[Column B (Income)]))
Please see the following screenshot.
Best Regards,
Angelia
Hi gregor,
What visual do you create?
>>In your solution I could get the Sum of one income for one ID, what I would need however is the sum of all types of income for all different IDs
You can use ALLEXCEPT function, if you just group the value sum for different ID, just use ALLEXCEPT(Test1,Test1[Column A (ID-Number)]).
Column = CALCULATE(SUM(Test1[Column D (Value)]),ALLEXCEPT(Test1,Test1[Column A (ID-Number)]))
If you have any question, please let me know.
Best Regards,
Angelia
thank you for your response
I would need to do that but I need to also get a sum for every Income
Meaning a Sum of all Values for every ID and every Income - I need this sums because I want to calculate with them and not just show them in a visual
I want to compare the sums between the IDs and types of income, this is why a visual is not sufficient.
My output should show something like this
10001 (ID) - Income 1 - 10,200.00 USD (Sum of all Values in the table for Income 1 and for ID = 10001)
10001 (ID) - Income 2 - 25,000.000 USD (Sum of all Values in the table for Income 2 and for ID = 10001)
...
This should be for all Incomes and all IDs
How can you calculate this?
This is the data I have in Power BI
I have 500 different IDs and 600 types of Income (Income column)
- v-huizhn-msft9 years agoMicrosoft Employee
Hi gregor,
Then you add [income] column in ALLEXCEPT function.changed_Column = CALCULATE(SUM(Test1[Column D (Value)]),ALLEXCEPT(Test1,Test1[Column A (ID-Number)],Test1[Column B (Income)]))
Please see the following screenshot.
Best Regards,
Angelia- gregor9 years agoFrequent Visitor