Forum Discussion
Jbmolina93
8 years agoFrequent Visitor
Create view from table
I have a dataset with columns person, age, department, and date. I'm trying to get the sum of people under the age of 18 grouped by the department from that month. Attached is an example data set. ...
- 8 years ago
Hi, Try with this
MyTable2 = SUMMARIZE ( FILTER ( Table1; Table1[Age] < 18 ); Table1[Name]; Table1[Date].[Month]; "Department A Total"; CALCULATE ( COUNT ( Table1[Name] ); Table1[Department] = "A" ); "Department B Total"; CALCULATE ( COUNT ( Table1[Name] ); Table1[Department] = "B" ) )Regards
Victor
Lima - Peru
Vvelarde
8 years agoCommunity Champion
Hi, Try with this
MyTable2 =
SUMMARIZE (
FILTER ( Table1; Table1[Age] < 18 );
Table1[Name];
Table1[Date].[Month];
"Department A Total"; CALCULATE ( COUNT ( Table1[Name] ); Table1[Department] = "A" );
"Department B Total"; CALCULATE ( COUNT ( Table1[Name] ); Table1[Department] = "B" )
)
Regards
Victor
Lima - Peru
Jbmolina93
8 years agoFrequent Visitor
Thank you so much. This is a simple example that can be implemented in different scenarios.