cancel
Showing results for 
Search instead for 
Did you mean: 

Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

Jerry
08 Mountaineer

Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

Hello;

 

Can the label within Custom Legend mange arithmetic algoritm and present the result on the Legend label? There where clause already manage it, can it be done for the legend?

 

For example;

Label:

Transactions: Base24PosTransactionSummary.TRANCNT Base24PosTransactionSummary.TRANCNT/Base24PosTransactionSummary.TRANCNT3 %

 

Expected result:   #  Result %

 

label.JPG

 

custom legend.JPG

Tags (3)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Shoaib_Dilawar
12 Sherpa

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

@Jerry, you can use RONND() function to either round it completely, or round it to 2 digits.

 

ROUND(TRANCNT/TRANCNT2, 2) for 2 decimal or

ROUND(TRANCNT/TRANCNT2) for non floating number.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib

View solution in original post

Jerry
08 Mountaineer

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

@Shoaib_Dilawar

 

It worked. Thank you for you help.

rounded percentage.JPG

View solution in original post

6 REPLIES 6
LouisZ
Staff

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

Hi Jerry,

 

One possible way to do this would be to create a user-defined field using the calculations you want and then display the user-defined field in the custom legend label. Make sure that you use a calculated field though, so that it doesn't intepret your calculation as a string.

calculated-user-defined-field.PNG

Jerry
08 Mountaineer

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

I tried it but it is not letting me use  =Base24PosTransactionSummary.TRANCNT/Base24PosTransactionSummary.TRANCNT2 only.  

 CALCULATE USERDEFINE.JPG

 

Shoaib_Dilawar
12 Sherpa

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

Hi @Jerry,

 

you'd need to change the 'Field Type' to Numeric if you are operating on Numeric fields. That should fix the issue you are facing.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Jerry
08 Mountaineer

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

Great. Got it working. How can I eliminate the decimal point of a division in the label?percentage label.JPG

Shoaib_Dilawar
12 Sherpa

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

@Jerry, you can use RONND() function to either round it completely, or round it to 2 digits.

 

ROUND(TRANCNT/TRANCNT2, 2) for 2 decimal or

ROUND(TRANCNT/TRANCNT2) for non floating number.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Jerry
08 Mountaineer

Re: Can Legend label reflect a result of an arithmetic division inserted in the Custom Legend label?

@Shoaib_Dilawar

 

It worked. Thank you for you help.

rounded percentage.JPG