Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Bukan4x4
Contributor III
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_nameCurrent-YearGroup
A2019X
A2018X
B2019X
C2019Y
D2018X

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

Project_NameSale_YearSales
A201910
A201820
B20195
B201810
C201915
D201850

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?

Thanks for advance,

Jorge

 

 

 

 

Labels (1)
4 Replies
pepecc
Contributor III
Contributor III

Try this:

 

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

 

Kind regards.

Bukan4x4
Contributor III
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

 

 

 

pepecc
Contributor III
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.

Bukan4x4
Contributor III
Contributor III
Author

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

regards