Hi All,
I have a requirement for a BO report which shows the summarised data for the below data set. Currently my BO report appears like shown below.
Rate Cat | Supplier | Date | Installation | Energised Count | De-Energised Count |
T031 | AAA | 01.02.20122 | 300000 | 1 | 0 |
T035 | BBB | 06.08.2012 | 300000 | 1 | 0 |
T031 | AAA | 11.03.20122 | 400110 | 0 | 1 |
T035 | BBB | 18.09.2012 | 400110 | 1 | 0 |
T031 | AAA | 01.12.2012 | 600200 | 0 | 1 |
T035 | BBB | 06.08.2012 | 600200 | 1 | 0 |
T044 | BBB | 04.04.2012 | 600200 | 1 | 0 |
I am facing 2 issues with this
1. I need to display only the records with the latest date for each 'Installation' as shown below
RATE CAT | SUPPLIER | DATE | INSTALLATION | ENERGISED COUNT | DE_ENERGISED COUNT |
T035 | BBB | 06.08.2012 | 300000 | 1 | 0 |
T035 | BBB | 18.09.2012 | 400110 | 1 | 0 |
T031 | AAA | 01.12.2012 | 600200 | 0 | 1 |
I have tried creating a variable v_Max, as shown below, which returns '01/01/1111' if the DATE is the latest date for that INSTALLATION and tried to add a block level Filter to show only records with vMax = '01/01/1111' but it didnt work for some reason.
vMax = IF( Max(DATE) In (INSTALLATION) = DATE) Then '01/01/111' Else '12/12/9999'
Note: I converted 'DATE' to a Measure so that it allows me to perform the above logical test.
2. After getting the records with the lates DATE, I need to summarise it by RATE CAT and SUPPLIER and display in the below format.(Excluding INSTALLATION)
RATE CAT | SSUPPLIER | ENERGISED COUNT | DE_ENERGISED COUNT |
T035 | BBB | 2 | 0 |
T031 | AA | 0 | 1 |
Any help is appreciated.