Forum Discussion
Grouping Data with Ponders
- 5 years ago
Hi JureGa ,
We can use the split function to meet your requirement.
1. In Editor Query, split the Product column by “x”.
2. Then we need to group the product.1 and product.2.
3. At last, we can create a measure to get the result.
Measure 2 = SUMX('New table',CALCULATE(SUM('New table'[Product.1]))*CALCULATE(SUM('New table'[Sum_quantity])))If you have any question, please kindly ask here and we will try to resolve it.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi amitchandak,
my file is really big and has a lot of sensitive data, so maybe I can explain you what I want to acchieve with the tables bellow:
1. I have data source like this
| Product | Quantity |
| 1xProduct 1 | 1 |
| 1xProduct 1 | 3 |
| 1xProduct 1 | 1 |
| 5xProduct 1 | 2 |
| 5xProduct 1 | 1 |
| 50xProduct 1 | 2 |
| 1xProduct 1 | 2 |
| 1xProduct 1 | 2 |
| 1xProduct 1 | 2 |
| 50xProduct 1 | 2 |
2. When I run Power BI report the following data is shown:
| Product | Quantity |
| 1xProduct 1 | 11 |
| 5xProduct 1 | 3 |
| 50xProduct 1 | 4 |
3. But I want to achieve this:
| Product | Quantity |
| 1xProduct 1 | 226 |
Is it understandable?
Thank you and BR,
Jure