Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Unicorn_Tech
Resolver I
Resolver I

summarizecolumn to return group of total values

 
Hello. I have a table of plots, the farmer name, area, and plant type. Each record is a different plot.
 
I wanted to create a summary table, per grower per plant type, summing up the total area across all the plots.

This solution:
Total per Grower =
Calculatetable(
SUMMARIZE(
new_plotinformations,new_plotinformations[Grower],new_plotinformations[_new_variety_id_value],new_plotinformations[Total Planted Ha Converted],new_plotinformations[_new_country_id_value],new_plotinformations[Plantation Status],new_plotinformations[statecode],new_plotinformations[_new_licensee_value],new_plotinformations[_new_company_id_value],new_plotinformations[Production Status]
),
new_plotinformations[Plantation Status] = "Commercial")
Did not return a total for each variety per grower.  Instead, it simply pulled each plot record, which is what the source table already had.

I tried the below, but it didn't work.  Can someone please advise how I would do a summary table?
SUMMARIZEcolumns
(new_plotinformations[_new_company_id_value],new_plotinformations[_new_variety_id_value],
new_plotinformations,new_plotinformations[Grower],new_plotinformations[_new_variety_id_value],new_plotinformations[Total Planted Ha Converted],new_plotinformations[_new_country_id_value],new_plotinformations[Plantation Status],new_plotinformations[statecode],new_plotinformations[_new_licensee_value],new_plotinformations[_new_company_id_value],new_plotinformations[Production Status]
),
new_plotinformations[Plantation Status] = "Commercial")


I would appreciate some advice, if people could let me know what I did wrong here. I should also mention that the reason for doing this in the first place is that I need to show growers and their varieties, provided their total sum of each variety is greater than 1.0. So if a grower has 5 plots each with .5 area of PlantTypeA = include them all.  If a grower has 2 plots with planttypeB, but their total sum is .8 - don't include this variety at all.

2 REPLIES 2
amitchandak
Super User
Super User

@Unicorn_Tech , Try like

 

SUMMARIZE(
filter(new_plotinformations,new_plotinformations[Grower],new_plotinformations[Plantation Status] = "Commercial"),new_plotinformations[_new_variety_id_value],new_plotinformations[Total Planted Ha Converted],new_plotinformations[_new_country_id_value],new_plotinformations[Plantation Status],new_plotinformations[statecode],new_plotinformations[_new_licensee_value],new_plotinformations[_new_company_id_value],new_plotinformations[Production Status]
)

Unfortunately this didn't work. "Too many arguments were passed to the FILTER function. The maximum argument count for the function is 2."

Is there an easier way to have a new table with Grower, Variety type, and the total sum across all plots?  I added additional columns that I would need, and removing those extra columns didn't seem to make a difference.  

Perhaps SUMMARIZE isn't correct here? 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.