Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Thanks for advance,
Jorge
Try this:
sum({<Sale_Year ={"$(=concat(Distinct Current-year,','))"}>} Sales)
Kind regards.
Thank pepecc!
I tried in a KPI box, but don't show any result 😞
Maybe a sintax error, could you chek please?
Jorge
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.
Thanks, but the problem isn't the name. Any other idea?
regards