Forum Discussion

Luca2020's avatar
Luca2020
Helper I
5 years ago

Summarize using column from other table

Hi, 

I've a table - CRM PREVENTIVI - with a list of Items and a table - TEMPI DI PRODUZIONE - with the month (or months) when those Items were made. 

 

I need a new table with all the Items and the months of production like: 

 

Table = SUMMARIZE('CRM PREVENTIVI' ; 'CRM PREVENTIVI'[Item]; "Month"; LOOKUPVALUE('*TEMPI PRODUZIONE'[Month]; '*TEMPI PRODUZIONE'[Item]; 'CRM PREVENTIVI'[Item]))
 
Table: 
ITEM  MONTH
1       January
2       January
2      February
 
I need this table because not all the Items we sell are made by us, some of them we just buy and resell so not all of them are included in TEMPI DI PRODUZIONE. I cannot use summarize(TEMPI DI PRODUZIONE; ....) because of this reason. I need summarize(CRM PREVENTIVI, ....) to include them all.
 
I've tried to create two different tables with summarize and then use UNION, It worked perfectly but when I tried to create a relation between this new union table and CRM PREVENTIVI, a message told me I could not because of a circular dependence
 
Thanks!