Forum Discussion
Advice on creating new summary table, based on filtering data from 2 other tables.
- Anonymous2 years ago
Hi InventoryMan ,
Here are the steps you can follow:
1. Create calculated table.
Table = var _column= SELECTCOLUMNS( FILTER(ALL(Assets), 'Assets'[InventoryDate]=DATE(1976,7,4)),"Column_ID",'Assets'[Location_id]) var _table1= SUMMARIZE( 'Locations','Locations'[Region], "Total Sites",COUNT('Locations'[id]), "Expected Assets",SUM('Locations'[SiteCount]), "Pending Sites",COUNTX(FILTER(ALL(Locations),'Locations'[id] in _column&&'Locations'[Status]<>"Complete"&&'Locations'[Region]=EARLIER('Locations'[Region])),[Region])) return _table12. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
InventoryMan , Try like
SUMMARIZECOLUMNS(Locations[Region],
"Total Sites", COUNT('Locations'[Id]),
"Expected Assets", SUM('Locations'[SiteCount]),
"Pending Sites", COUNT('Locations'[Id]),
Filter(Assets, Assets[InventoryDate] = DATE(1976, 7, 4) )
Filter(Locations, Locations[Status] <> 'complete')
)
refer
https://www.sqlbi.com/articles/introducing-summarizecolumns/
- InventoryMan2 years agoFrequent Visitor
amitchandak Thank you, but I still receive an error for the filter. I will add some sample data, and perhaps there is another way to accomplish what I am looking for.