# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## 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
Contributor II

## Re: Change number formatting in expression - Qliksense

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

Regards,

Justin.

5 Replies

## Re: Change number formatting in expression - Qliksense

Try this.

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

Regards,

Kaushik Solanki

Contributor

## Re: Change number formatting in expression - Qliksense

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

Contributor II

## Re: Change number formatting in expression - Qliksense

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

Regards,

Justin.

Contributor

## Re: Change number formatting in expression - Qliksense

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 ?

Contributor II

## Re: Change number formatting in expression - Qliksense

Hi Ruti,

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

Regards,

Justin.