Forum Discussion
Anonymous
2 years agoNot applicable
Sum some categories for the same date
dear all, Please help me to solve a problem. I'm a beginner and I need to solve a problem. I attached a sampe data. I want to group all the fruits belonging to a certain date. The reason is tha I...
- Anonymous2 years ago
Hi Anonymous
amitchandak GOOD ANSWER!
Here are my additions:
You can create a calculated column.
Type1 = SWITCH(TRUE(), [Type] = "apple" || [Type] = "bannana" || [Type] = "orange", "fruits", [Type] = "Bicycle", "Car", [Type] = "house", "House", [Type] = "PC", "PC")And a measure.
Sum = CALCULATE(SUM('Table'[Cost]), ALLEXCEPT('Table', 'Table'[Type1], 'Table'[Date]))Or do the following:
Output:
Is this the result you expect?
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
2 years agoAnonymous , You need to create a calculated column using Switch
Switch(True() ,
[Type] in {"apple","orange","banana"} , "fruits",
//add additional code
"Others"
)
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56