Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add % to label in Expression Editor

Hi,

I'm trying to format a calculation as a percentage in the Colors and Legend: By Measure: Expression Editor section of a Map chart.  Can someone tell me if that is possible and if so, how to go about doing it?  The basic formula is as follows:

count(distinct([Acct]))/sum(TotalEEs)

Thanks,


Bryan

12 Replies
NZFei
Partner - Specialist
Partner - Specialist

If you create a master measure (Say MyMeasure) first and then select it in the Map property --> Appearance --> Colors and Legend --> Colors (Custom) --> By Measure --> MyMeasure

Will that work for you?

shraddha_g
Partner - Master III
Partner - Master III

I don't think you need to format the expression which you are using for color.

Still you can try num(count(distinct([Acct]))/sum(TotalEEs),'#,##0.00%').

Not applicable
Author

Hi, Shraddha,

I tried the code you suggested but it didn't produce any changes to the format of the numbers.  Any other suggestions?

Thanks,

Bryan

shraddha_g
Partner - Master III
Partner - Master III

It wont make any change in format because you are applying it for color expression.

If you want to change the format of number which are displayed on pop up(hover on points) then you will have to use num() in expression used in Measure section of chart.

Not applicable
Author

What I'm trying to display is a combination of two measures.  I am using a Point Layer on the Map chart.

The bubble size is based on the number of employees in a group.  The Appearance of the bubbles is set in Colors and Legend: Custom, By Measure where the color is chosen based on the result of a calculation of unique customers out of total employees in a group, written as this in the Expression Editor: count(distinct([Acct]))/sum(TotalEEs).  We want this number to be expressed as a percentage.


I've tried a number of variations of num(count(distinct([Acct]))/sum(TotalEEs),'#,##0.00%') in the formula, but none of them have an effect on the display of the calculation.  Can you think of a way to make this happen, or am I basically out of luck?


Thanks again,


Bryan

shraddha_g
Partner - Master III
Partner - Master III

Formatting the expression which is used for color or bubble size wont make any differece.

If possible provide a sample app..

Not applicable
Author

Perhaps this will help.  I'm not sure how I would go about providing a sample app of this data.

Capture.JPG

shraddha_g
Partner - Master III
Partner - Master III

When you hover on bubbles what does it show?

Do you expect % sign there?

Not applicable
Author

It shows the number of employees in the group and a number like 0.15 instead of 15%, which is what we'd prefer to see.  Same for the legend--would prefer the numbers be expressed as percentages and not unformated numbers.