Skip to content

Commit

Permalink
HDX-9467 - Quick Charts: displaying the same figure for several key f…
Browse files Browse the repository at this point in the history
…igures

- only apply the "!" operator for sums
  • Loading branch information
aalecs committed Mar 1, 2024
1 parent 3627d39 commit dea971c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export class CountOperation extends AbstractOperation {
if (aggColumns.length === 0) {
aggColumns.push('#fake_column');
}
const operations: string[] = valueCols.map(valueCol => `${operation}(${valueCol}!) as ${valueCol ? valueCol : '#meta+count'}`);
const extraOperator = operation == "sum" ? "!" : "";
const operations: string[] = valueCols.map(valueCol => `${operation}(${valueCol}${extraOperator}) as ${valueCol ? valueCol : '#meta+count'}`);
super(new CountRecipe(aggColumns, operations));
}

Expand Down

0 comments on commit dea971c

Please sign in to comment.