Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to display latest record based on P_Date.
| Emp_ID | DEPT | SECTION | P_DATE | |
| 101 | DEPT1 | S1 | 2/12/2022 | |
| 101 | DEPT2 | S2 | 2/13/2022 | |
| 101 | DEPT3 | S3 | 1/13/2022 | |
| 102 | DEPT4 | S4 | 4/14/2022 | |
| 102 | DEPT5 | S4 | 4/13/2022 |
I want to display only below records
| 101 | DEPT2 | S2 | 2/13/2022 | |
| 102 | DEPT4 | S4 | 4/14/2022 |
I have used below expression in set analysis, it is working fine if I am selecting specific Emp_ID
but I want to display latest records by default in table object
if(GetSelectedCount(Emp_ID)>0, Count({< P_DATE={"$(=Date(Max(Aggr(if (P_DATE<=Max(McalDate), P_DATE),
P_DATE)),'MM/DD/YYYY'))"}>} distinct Emp_ID),
Count(distinct Emp_ID))
Kindly help.
Try below
Dimension > EMP_ID, DEPT, SECTION
Measure > Aggr(max(P_DATE),EMP_ID)