Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community
i need to color the rows of a straight qlikview table (in the left of the image) as the one in the right of the image.
the rule could be:
- if the value of the first column is "Total" or "TOTAL" --> Yellow
- if the values is not "Total" or "TOTAL" then start to color the row as stripes (the first need to be always gray, then white)
I attach a file.
Thanks
Modification in the script will be a better option to do this
Table:
LOAD OCF_MOD_TOT_ITA_NW_BB_FM_ROWNUM,
Q_OCF_MKT_OR_MOD
FROM
[..\..\Downloads\Avanzamento OCF.xls]
(biff, embedded labels, table is Sheet1$);
tmpCumValueColorCode:
LOAD Q_OCF_MKT_OR_MOD,
Max(OCF_MOD_TOT_ITA_NW_BB_FM_ROWNUM) as MaxValue
Resident Table
Group By Q_OCF_MKT_OR_MOD;
CumValueColorCode:
LOAD If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), 0, RangeSum(Peek('CumValue'), 1)) as CumValue,
If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), 0, Mod(RangeSum(Peek('CumValue'), 1), 2)+1) as CumValueColorCode,
Q_OCF_MKT_OR_MOD
Resident tmpCumValueColorCode
Order By MaxValue;
DROP Table tmpCumValueColorCode;
It is slightly different, but see if this works
=If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), Yellow(),
If(Mod(Aggr(RangeSum(Above(If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), 0, 1), 0, RowNo())), (Q_OCF_MKT_OR_MOD, (=Max(OCF_MOD_TOT_ITA_NW_BB_FM_ROWNUM)))), 2) = 1, LightGray()))
hey man,
really thanks. is almost the solution but the wish is to have grey after each yellow and then alternated stripes.
as in the image i attached.
Paolo.
Modification in the script will be a better option to do this
Table:
LOAD OCF_MOD_TOT_ITA_NW_BB_FM_ROWNUM,
Q_OCF_MKT_OR_MOD
FROM
[..\..\Downloads\Avanzamento OCF.xls]
(biff, embedded labels, table is Sheet1$);
tmpCumValueColorCode:
LOAD Q_OCF_MKT_OR_MOD,
Max(OCF_MOD_TOT_ITA_NW_BB_FM_ROWNUM) as MaxValue
Resident Table
Group By Q_OCF_MKT_OR_MOD;
CumValueColorCode:
LOAD If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), 0, RangeSum(Peek('CumValue'), 1)) as CumValue,
If(WildMatch(Q_OCF_MKT_OR_MOD, '*Total*'), 0, Mod(RangeSum(Peek('CumValue'), 1), 2)+1) as CumValueColorCode,
Q_OCF_MKT_OR_MOD
Resident tmpCumValueColorCode
Order By MaxValue;
DROP Table tmpCumValueColorCode;