Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i need your help to calculate a value.
So,this is my dataset
COD PERSON | COD ANIMAL | CATEGORY | AMOUNT |
A | 2 | CAT2 | 7655,8 |
A | 3 | CAT2 | 1064,02 |
B | 5 | CAT3 | 22 |
B | 6 | CAT3 | 5000 |
C | 7 | CAT1 | 30 |
C | 8 | CAT5 | 50 |
I want to the take, for every "COD PERSON" that have two different "COD ANIMAL" ,the row that have Amount, for each row, <=5000.
So in my table is expected to have
C | 7 | CAT1 | 30 |
C | 8 | CAT5 | 50 |
how can i do?? I need to calculate this in frontend
Hi Khawar, you can try with:
Sum({<[COD PERSON]={"=Count(Distinct [COD ANIMAL])=2"}, AMOUNT={"<=5000"}>} AMOUNT)
Change "=2" to ">1" for "more than 1 different animal" instead of "two different animals"
Hi Khawar,
Hope below is what you want.
Thanks.
Aiolos
Hi Khawar,
The Aggr function is just like a group by in the front-end.
And add "nodistinct" means for every group, the expression will calculate a value.
I think you can try to create some table and value to try to use it
or you can find some other examples to see.
Hope I have clarified the aggr nodistinct.
Please make my answer to "correct" status, so other person will know the thread is finished.
Thanks.
Aiolos