Created
August 20, 2013 20:54
-
-
Save Kurt-P/6287165 to your computer and use it in GitHub Desktop.
Group and sum a set of data with powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gdata = $printsLogs | Group-Object -Property userId | |
$test = @() | |
$test += foreach($item in $gdata){ | |
$item.Group | Select -Unique userId, | |
@{Name = 'PageTotal';Expression = {(($item.Group) | measure -Property pages -sum).Sum}} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment