Forum Discussion

visittokiran's avatar
visittokiran
Frequent Visitor
5 years ago

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 
codeareasub area
a1A1
acA2
adaA3
adaB1
aB2
daB3
daB4

 

 TABLE -2 
code  
codeCONSUMER TYPECONSUMER
a1D50
acE100
adaF150
a 300
da  

 

i wan to summerize data from these tables in new table as follow

AREASUB AREACONSUMERSUM OF CONSUMERS
A1D50
A1E 
A1F 
A2D 
A2E 
A3F 
B1D 
  E 
  F 

there is one unique coloumn also with code in both tables. 

Please help..

1 Reply

  • v-yingjl's avatar
    v-yingjl
    Community 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.