0

I'm preparing some charts, with positive and negative values. I would like to create one pie chart, including all the values (the positive and negative). Of course, this doesn't work as only positive numbers should be considered. So I tried to rewrite the results (to cancel the "-") but it doesn't work. I would like to have "-100" displayed as "100", and the "100" staying at "100", so that I can create my graph.

Does somebody has an idea?

0

For Drupal 7 you could use the Global: Math expression field to perform a mathematical operation. Load the initial field first, suppress it from display and use the replacement token within the Math field: (abs([initial_field])).

For Drupal 8 this field does not exist (yet), though there is a sandbox linked in post #10 here: https://www.drupal.org/node/2544670. It might work.

1
  • Awesome! You can use the check symbol (✓) left of the answer to mark it as solved :) Jan 5 '17 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.