Forum Discussion
Addition, sum logic in Power BI
- 9 years ago
Hi Worldbreaker,
I try to reproduce and get the desired result, please review the following steps.
1. Click "New Table" under Modeling on Home page, type the following formula.Table = UNION(UNION(SELECTCOLUMNS(Table1,"Basket",Table1[Basket 1]),SELECTCOLUMNS(Table1,"Basket",Table1[Basket 2])),SELECTCOLUMNS(Table1,"Basket",Table1[Basket 3]))
2. Create another new table based on the table above.
Table 2 = SUMMARIZE(FILTER('Table','Table'[Basket]<>BLANK()),'Table'[Basket],"Additional",COUNTA('Table'[Basket]))
3. Create a relationship between your table, and the new 'Table 2'.
4. Create a table visual, select the sum of total fruit, the 'Table 2'[Additional] but don't summarize, you will get the right result.
Thanks,
Angelia
Hi Worldbreaker,
I try to reproduce and get the desired result, please review the following steps.
1. Click "New Table" under Modeling on Home page, type the following formula.
Table = UNION(UNION(SELECTCOLUMNS(Table1,"Basket",Table1[Basket 1]),SELECTCOLUMNS(Table1,"Basket",Table1[Basket 2])),SELECTCOLUMNS(Table1,"Basket",Table1[Basket 3]))
2. Create another new table based on the table above.
Table 2 = SUMMARIZE(FILTER('Table','Table'[Basket]<>BLANK()),'Table'[Basket],"Additional",COUNTA('Table'[Basket]))
3. Create a relationship between your table, and the new 'Table 2'.
4. Create a table visual, select the sum of total fruit, the 'Table 2'[Additional] but don't summarize, you will get the right result.
Thanks,
Angelia