Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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.
So I want my data to look like this.
Person | Date | Department A Total | Department B Total |
John Smith | January | 2 | 1 |
John Smith | February| 1 | 2 |
Solved! Go to Solution.
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
I know you can use a matrix to visualize this but what I'm trying to do is get this data on a new table. Dax is not my strong suit yet.
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
Thank you so much. This is a simple example that can be implemented in different scenarios.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 32 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |