Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am creating a QV 9.0 SR5 application. I have a Straight Table with about 6 columns. The requirement is that if a value is repeated in column 1, then the value should not be displayed. For instance:
Name | Revenue | Cost | |||
---|---|---|---|---|---|
A | 123 | 123 | |||
123 | 123 | ||||
123 | 123 | ||||
B | 123 | 123 | |||
123 | 123 | ||||
C | 123 | 123 |
I thought I would accomplish this by setting the "Text Color" property on the dimension I am using for that first column. I used this expression for the text color:
=IF(Above(DivisionName)=DivisionName,RGB(255,255,255), RGB(0,0,0))
That got me this:
Name | Revenue | Cost |
---|---|---|
A | 123 | 123 |
123 | 123 | |
A | 123 | 123 |
B | 123 | 123 |
123 | 123 |
See how "A" shows up again on the third row? I need to avoid that but I'm not sure how.
Anyone have any advice for me?
Thanks!
NAME is not your only dimension right?
If so, it is good to post a as-close-to-reality-as-possible example or a small qlikview sample app, if possible.
Have you had a look at a pivot table? The pivot table feature something very similar of what you try to do in a straight table (but may have other issues which let you prefer a straight table again, e.g. sorting or partial sums).
Anyway, I think the problem is that above is evaluated in the column segment, where a new segment leads to above returning NULL. A new segment could be due to your dimensions, thus my initial question.
You could force QV to have only one column segment by using the TOTAL qualifier in your above function, so you could try:
=if (above(total DivisionName)=DivisionName,white(),black())
Regards,
Stefan
NAME is not your only dimension right?
If so, it is good to post a as-close-to-reality-as-possible example or a small qlikview sample app, if possible.
Have you had a look at a pivot table? The pivot table feature something very similar of what you try to do in a straight table (but may have other issues which let you prefer a straight table again, e.g. sorting or partial sums).
Anyway, I think the problem is that above is evaluated in the column segment, where a new segment leads to above returning NULL. A new segment could be due to your dimensions, thus my initial question.
You could force QV to have only one column segment by using the TOTAL qualifier in your above function, so you could try:
=if (above(total DivisionName)=DivisionName,white(),black())
Regards,
Stefan
Thank you very much, Stefan. Adding the TOTAL qualifier in the formula did the trick. I do have just one Dimension in this chart. I don't understand what a Column Segment is yet so I'll go do some reading on that topic next.
Peter
RowNo() is also evaluated in the column segment context. So just to get known to the concept, you could add 2 expressions with =rowno() and = rowno(total) to see the difference.
Regards,
Stefan