mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
21 lines
381 B
PowerShell
21 lines
381 B
PowerShell
function Invoke-Sum {
|
|
param($data,$dimension,$measure)
|
|
|
|
$h=@{}
|
|
|
|
foreach ($item in $data){
|
|
$key=$item.$dimension
|
|
|
|
if(!$key) {$key="[missing]"}
|
|
|
|
$h.$key+=$item.$measure
|
|
}
|
|
|
|
foreach ($entry in $h.GetEnumerator()){
|
|
[PSCustomObject]@{
|
|
Name=$entry.key
|
|
$measure=$entry.value
|
|
}
|
|
}
|
|
|
|
} |