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: 
RutiTaumanRubin
Creator
Creator

Change number formatting in expression - Qliksense

Hi,

I have created the following measure:

if (Getfieldselections(Sales_type)='Percent',sum(per_sales)/100 ,sum(sales))

I want that the measure will display as percent when the user will choose the option 'Percent' else will display as number.

Is it possible?


Thank's!

1 Solution

Accepted Solutions
justinphamvn
Creator II
Creator II

Hi Ruti,

Try this.

if (Getfieldselections(Sales_type)='Percent',num(sum(per_sales)/100,'#,##0%' ),Num(sum(sales),'#,##0'))


And set Number formatting as Measure expression of the KPI properties

format_num.png

Regards,

Justin.

View solution in original post

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

if (Getfieldselections(Sales_type)='Percent',num(sum(per_sales)/100,'#,##0%' ),Num(sum(sales),'#,##0'))


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
RutiTaumanRubin
Creator
Creator
Author

it doesn't work in if function....

justinphamvn
Creator II
Creator II

Hi Ruti,

Try this.

if (Getfieldselections(Sales_type)='Percent',num(sum(per_sales)/100,'#,##0%' ),Num(sum(sales),'#,##0'))


And set Number formatting as Measure expression of the KPI properties

format_num.png

Regards,

Justin.

RutiTaumanRubin
Creator
Creator
Author

Thank you for your response !

it's work and the measure display as percent but the Y-axis still appear as number format (0.8) , there is an option that the format of Y-axis will display also as percent ?

justinphamvn
Creator II
Creator II

Hi Ruti,

I think this option is not available yet for the current version of Qlik Sense

Regards,

Justin.