This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello!
Need help with the correct approach to do the following. I have a table that looks like:
| Store | State | Product | Sales |
| A | CA | Apple | 5 |
| A | CA | Pear | 1 |
| A | CA | Orange | 1 |
| A | CA | Celery | 5 |
| B | CA | Apple | 5 |
| B | CA | Pear | 5 |
| B | CA | Orange | 5 |
| B | CA | Celery | 1 |
| C | TX | Apple | 5 |
| C | TX | Pear | 5 |
| C | TX | Orange | 4 |
| C | TX | Celery | 1 |
I'd like to add rows with the sum of the fruits:
| A | CA | Fruit | 7 |
| B | CA | Fruit | 15 |
| C | TX | Fruit | 14 |
Solved! Go to Solution.
Hi @shuberml
Create a table with category and product as below, then relate two tables with "product" column,
Add columns into matrix and select "sum" aggregation, set filters as below:
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you both! Used the second solution, but both were effective!
Hi @shuberml
Create a table with category and product as below, then relate two tables with "product" column,
Add columns into matrix and select "sum" aggregation, set filters as below:
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@shuberml , You need to define a category fruit / not fruit, and then it a simple sum.
This can be calculated column
Type = if([Product]<>"Celery","Fruit","Not Fruit")
Then you can filter on Fruit.
Or you can try SEGMENTATION
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 25 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 27 | |
| 20 | |
| 19 |