Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a cell value in a straight table. The original value is "G,3" (no quotes)
What I'm attempting is pass the cell contents and background color in one argument
In this case, the cell value = "G" and the background = 3
My expression to extract the left piece - Left(Cell001,Index(Cell001,',') - 1)
I thought this would get the G and leave the original contents alone after this expression the contents are no longer "G,3" but only "G".
Is there a way to act on the original value so I can get the right piece (i.e. 3) ?
Might not be the only solution but I had to break up the field during the load
Table1:
Load Table1Data,
SubField(col1,',',1) as col1,
SubField(col1,',',2) as col1bg
For the straight table
Add expression - col1
Col1 - Background color - Pick(col1bg,RGB(255,0,0),RGB(255,255,0),RGB(0,255,0),RGB(128,128,128))
Col1 - Text color - Pick(col1bg,White(),Black(),Black(),White())
Not the worst work-around. Prefer QlikView expressions didn't work like reference base parameters
Can you please upload the file so we can take a look at it? That makes it much easier to help you.
Can't upload the proprietary qv but this is the cell.
G is what I want to show - Left(Cell001,Index(Cell001,',') - 1) but when I run this expression, the 3 is no longer available.
Effectively what the expression does is this...
Cell001 = Left(Cell001,Index(Cell001,',') - 1)
Hi,
What is your expected output??
use & to concat to output
like
Cell001 = subfield(Cell001,',',1) & ' ' & subfield(Cell001,',',2)
It will give you output as G 3
Regards
Data source has "G,3". Cell needs to show...
The first part is the contents of the cell. The second part determines the background color
Subfield is nice but it doesn't work because it's replacing the contents of the cell and I lose the second part (the 3)
Might not be the only solution but I had to break up the field during the load
Table1:
Load Table1Data,
SubField(col1,',',1) as col1,
SubField(col1,',',2) as col1bg
For the straight table
Add expression - col1
Col1 - Background color - Pick(col1bg,RGB(255,0,0),RGB(255,255,0),RGB(0,255,0),RGB(128,128,128))
Col1 - Text color - Pick(col1bg,White(),Black(),Black(),White())
Not the worst work-around. Prefer QlikView expressions didn't work like reference base parameters