# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for
Did you mean:
Contributor III

## Don't know how calculate by group in App

Hi All, I Have problem to calculate a sum of numer of sales by group in my APP.

I have 2 tables:

 Project_name Current-Year Group A 2019 X A 2018 X B 2019 X C 2019 Y D 2018 X

Where Current_Year is the year that the project is available for sale; Group is for grouping different projects.

 Project_Name Sale_Year Sales A 2019 10 A 2018 20 B 2019 5 B 2018 10 C 2019 15 D 2018 50

Where Sale_Year is the year where the project have sales; Sales is the number of Sales.

In my app I need to calculate the sum of sales of projects that are available in a select Year (current) and Select group.

Ej. If in the  APP I have select year: '2019' (Current-Year) and Group: 'X', the the result must show: 45  (30 sales project A + 15 Sales Project B).

How must be the sentece for calculate that?

Jorge

Labels (1)
• ### group by

4 Replies
Contributor III

Try this:

sum({<Sale_Year ={"\$(=concat(Distinct Current-year,','))"}>} Sales)

Kind regards.

Contributor III
Author

Thank pepecc!

I tried in a KPI box, but don't show any result  😞

Maybe a sintax error, could you chek please?

Jorge

Contributor III

I noticed yesterday that there was a bug in the formula (sorry, can´t test it), and I checked it. Try this one (this is the same than above):

sum({<Sale_Year ={"\$(=concat(Distinct Current-Year,','))"}>} Sales)

I have written Current-Year with the Y in capital letter.

Contributor III
Author

Thanks, but the problem isn't the name. Any other idea?

regards

Tags
Community Browser