We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

NegativeNumberFormat is ignored when isPercent is True

Answered
Denis asked on December 9, 2021

Hi, I faced with issue of negative formatting for percent fields.
Negative formatting works correctly in all cases, but when you set isPercent is true, the negativeNumberformat is simply ignored at the grid and a minus is always placed before the value.

Is it expected?

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 10, 2021

Hello, Denis,
 
Thank you for writing to us.
 
The described behavior means that negativeNumberFormat property doesn't affect the percent measures. We suggest you a workaround using the calculated values. Please check the example on the following JSFiddle: https://jsfiddle.net/flexmonster/23vk15oq/
 
We hope it helps. You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia

Public
Denis December 14, 2021

I'm not sure that calculated metrics will somehow help solve this problem.
In my opinion it's a little bit confused and quite unexpectedly for user that negativeNumberFormat doesn't affect the percent measures.

Can you describe what is the reason of such implementation? Why can't this be implemented on your side?

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 16, 2021

Hello, Denis,
 
Thank you for your response.
 
Currently, applying negativeNumberFormat is only possible for the non-percent values. However, your suggestion sounds reasonable. We have added negativeNumberFormat for the percent values to our customers' wishlist. Our team will notify you in case of any updates on the matter.
 
The workaround with calculated measure allows setting negativeNumberFormat. If you create a calculated measure which multiplies the original measure by 100, this calculated measure is an equivalent of the original measure with "isPercent": true. Please check the following example on the JSFiddle: https://jsfiddle.net/flexmonster/kb2s3xuw/
 
In the example above, the only difference in measures is the negative format, and their values stay the same.
 
We hope our answer helps.
 
Kind regards,
Nadia

Please login or Register to Submit Answer