# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

## Formula for summing a value of a dimension

Hi, I want to show the sum of a value of a dimension in a KPI. I have created the following hypothetical example to illustrate.

 Sales North 956.376,34 € South 805.544,99 € East 686.844,42 € West 581.089,77 € * Dimension: Sales * North, South, East, West are dimensional values

 North John 315.604,19 € Bob 191.275,27 € Billy 239.094,08 € Lincoln 210.402,79 € * Breakdown of North

What would be the best way to show the total sum of all sales in North, i.e., 956.376,34 € in the front end? My formula is

sum(if(Type='ComponentCVaR',Type,null())) but it is not working...

Thank you.

Tags (1)
5 Replies
Not applicable

## Re: Formula for summing a value of a dimension

Since Type is a text value, you don't want to sum() this, right?

Try summing a numeric field.

Not applicable

## Re: Formula for summing a value of a dimension

What is Type here?

Not applicable

## Re: Formula for summing a value of a dimension

Hello,

If Type is a text field it will not work.

You can try one of the following expressions (adapt according to your model):

• Sum(if(Region = 'North', Sales))
• Sum({<Region = {'North'}>} Sales)

Thanks,

Estela

Not applicable

## Re: Formula for summing a value of a dimension

Assuming you have a Field called "Sales" in your data that has both text and number.

For dimension: =Capitalize(KeepChar(lower(Sales),'abcdefghijklmnopqrstuvwxyz€'))

For expression: =sum(PurgeChar(lower(Sales),'abcdefghijklmnopqrstuvwxyz€'))

Not applicable

## Re: Formula for summing a value of a dimension

Hi Allen,

Use Pivot table extension and use

Dimension: Sales, Name

Expression: Sum(Type)

And use Subtotals.

Regards,

Jagan.

Community Browser