Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have data as below and would like to get it all into a single line. I have tried Max(agr) to no avail. Can someone help.
A | B | C | F | H | |
HE4545 | Y | - | - | - | - |
HE4545 | - | Y | - | - | - |
HE4545 | - | - | Y | - | - |
HE4545 | - | - | - | Y | - |
HE4545 | - | - | - | - | Y |
I ideally I want it in the following format.
A | B | C | F | H | |
HE4545 | Y | Y | Y | Y | Y |
The top one was created using an if statement based on multiple criteria that determines if there the value is to be 'Y'
The data has a date for corresponding values to A when Y is true but that might be different for B, C and so on...
MaxString() instead of Max?
Where are you trying this? Front-End / Back-End ??
Hello!
I didn't sure to get you right, but, please, see the attachement. May be it's it.
Hi thanks but that didn't work. I'm doing this in the back end in the load my syntanx looks like this:
IF(blah_blah = 'A' AND MATCH(yad_yah,'Y','B','1','3','5','6','7','8'),'Y', Null()) AS 'A'
Thats based on the fact that A can take any of the values 'Y','B','1','3','5','6','7','8' so when that is the case I want it to be Y
I do this for B, C & D such that I can get the table below:
A | B | C | F | H | |
HE4545 | Y | - | - | - | - |
HE4545 | - | Y | - | - | - |
HE4545 | - | - | Y | - | - |
HE4545 | - | - | - | Y | - |
HE4545 | - | - | - | - | Y |
what I want however is as below:
A | B | C | F | H | |
HE4545 | Y | Y | Y | Y | Y |
Can you post full code may be? Try this for once
IF(blah_blah = 'A' AND If(Index(MATCH(yad_yah,'Y','B','1','3','5','6','7','8'))>0,'Y', Null()) AS 'A'
Hi Anil I think your code might just do it but missing one of the brackets and having a torrid time placing it based on the logic