Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
m_grieco
Contributor
Contributor

[HOW TO] Sum value of different words

Hello everyone,

I have a table with different name of city (ex: Matera, MT, Bari, BA etc...) , find attached picture as example.

My question is: how can I sum value of Matera + MT , Bari + Ba  ? 

I've tried with formula:  =sum(if(PROV_ATTIVITA='Matera' and PROV_ATTIVITA=MT', 0)) but with no success.

Which formula I have to use?

Hope I explained clearly.

Thanks in advance for your helps.

 

4 Replies
sunny_talwar

May be Clean the data in the script to create a new field and use that in your chart

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If those names are aliases, it's probably best to map them to a common name in the script.  If you are wanting to do something specific in the chart you showed, how about:

-sum(match(PROV_ATTIVITA, 'Matera', 'MT')>0)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

m_grieco
Contributor
Contributor
Author

thanks Rob for your answer, but I get an error. 

Brett_Bleess
Former Employee
Former Employee

Mario, have a look at the following Design Blog post, I think this may be the easiest way to go at things:

https://community.qlik.com/t5/Qlik-Design-Blog/Mapping-and-not-the-geographical-kind/ba-p/1463192

Here is the base URL for the blog site in case you want to do further searching on your own for any additional info:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.