Forum Discussion
Use of summerize function to create new table using data from two different data tables .
friend,
I have following table in power bi data tables..
| TABLE-1 | ||
| code | area | sub area |
| a1 | A | 1 |
| ac | A | 2 |
| ada | A | 3 |
| ada | B | 1 |
| a | B | 2 |
| da | B | 3 |
| da | B | 4 |
| TABLE -2 | ||
| code | ||
| code | CONSUMER TYPE | CONSUMER |
| a1 | D | 50 |
| ac | E | 100 |
| ada | F | 150 |
| a | 300 | |
| da |
i wan to summerize data from these tables in new table as follow
| AREA | SUB AREA | CONSUMER | SUM OF CONSUMERS |
| A | 1 | D | 50 |
| A | 1 | E | |
| A | 1 | F | |
| A | 2 | D | |
| A | 2 | E | |
| A | 3 | F | |
| B | 1 | D | |
| E | |||
| F |
there is one unique coloumn also with code in both tables.
Please help..
1 Reply
- v-yingjlCommunity Support
Hi visittokiran ,
Based on your expected output, not certain how did you want to summarize it.
For example:
Why would the summarized table have 9 rows about 3 times repeat D,E,F consumer fields? If just only a simple crossjoin by consumer and area, how could the area B only have 1 row?
In addition, I have notived that the sum of consumers in the first row is 50, it related a1,A,1,1,D,50 these values.
If all datas are based on this logic, why ohters of sum of consumer values are 0? should ac,A,2,E,100 also be correct in the summarized table?
Perhaps you can consider sharing more details about your expected output for further discussion.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.