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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 need to add in a graph, per day, the following cat.:
- fruits (apple + orange+ banana)
- PC
- car
- House
can you please help me?
Solved! Go to Solution.
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 Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It seems to work. Thank you all.
It was also usefull the exemple!
Thank you Both. I will start to test it but it seems logical. I will come back if something is not clear for me.
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 Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , 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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |