Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
I tried below expression to get desired result . But this does not work . Earlier i had posted similar doubt which for some reason was spammed .
expression - max({1<target,proft>}Aggr(Max(TOTAL <target,proft,date_of_sale> date_of_sale),Client))
Source Data
Client | target | proft | date_of_sale |
C1 | 200 | 50 | 22/03/23 |
C1 | 100 | 20 | 17/03/23 |
C1 | 150 | 60 | 10/2/2023 |
C2 | 50 | 10 | 12/3/2023 |
C2 | 40 | 15 | 2/2/2023 |
C3 | 30 | 5 | 1/2/2023 |
C3 | 70 | 30 | 12/12/2022 |
Output
Client | target | proft | date_of_sale | max_date_for_client |
C1 | 100 | 20 | 17/03/23 | 22/03/23 |
C1 | 200 | 50 | 22/03/23 | 22/03/23 |
C1 | 150 | 60 | 10/2/2023 | 22/03/23 |
C2 | 50 | 10 | 12/3/2023 | 12/3/2023 |
C2 | 40 | 15 | 2/2/2023 | 12/3/2023 |
C3 | 30 | 5 | 1/2/2023 | 1/2/2023 |
C3 | 70 | 30 | 12/12/2022 | 1/2/2023 |
Thank you .
Hi
Try like below
Dim:
Client | target | proft | date_of_sale |
Exp:
Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft)))
Hi
Try like below
If(Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft)))= max(date_of_sale), Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft))))
Hi
Try like below
Dim:
Client | target | proft | date_of_sale |
Exp:
Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft)))
Thank You Sir . It works .
Can you also share me the set expression for below result as well . I tried firstsorted value but that didnot work .
Client | target_on_max_date | proft_on_max_date | maxdate |
C1 | 200 | 50 | 3/22/2023 |
C2 | 50 | 10 | 3/12/2023 |
C3 | 30 | 5 | 2/1/2023 |
Hi
Try like below
If(Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft)))= max(date_of_sale), Date(max(Total<Client>Aggr(Max(date_of_sale),Client, target, proft))))