mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-24 04:04:46 +00:00
17 lines
311 B
PowerShell
17 lines
311 B
PowerShell
function Invoke-Sum {
|
|
param($data,$dimension,$measure)
|
|
|
|
$h=@{}
|
|
|
|
foreach ($item in $data){
|
|
$h.$($item.$dimension)+=$item.$measure
|
|
}
|
|
|
|
foreach ($entry in $h.GetEnumerator()){
|
|
[PSCustomObject]@{
|
|
Name=$entry.key
|
|
$measure=$entry.value
|
|
}
|
|
}
|
|
|
|
} |