Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning,
I'm encountering an issue in my Qlik Pixel Perfect report where I'm unable to apply color formatting to subtotals and totals in a table.
The problem lies in the fact that Qlik does not support the use of the SumRunningSum function within the foreground color expression settings of a cell. As shown in the attached images, there is no available summary function that supports this — only the SUM function is available. However, the SUM function aggregates the total data and does not provide level-based aggregation for subtotals and totals.
I am attempting to use the following expression in the foreground color:
Iif(
(
sumrunningsum([bPuGcB_Level.Fatturato])
-
sumrunningsum([bPGcB_Level.Fatturato Confronto])
)
/
Iif(
sumrunningsum([bPGcB_Level.Fatturato Confronto]) <> 0,
sumrunningsum([bPGcB_Level.Fatturato Confronto])
,sumrunningsum([bPGcB_Level.Fatturato])
)
)
<0,
'Red', 'Black'
)
However, when I generate the report, the colors are not applied. It appears this is due to Qlik's limitation in supporting the SumRunningSum function within conditional formatting expressions.
Has anyone encountered a similar issue or found a workaround for applying color formatting to totals and subtotals in Pixel Perfect reports?
Thank you in advance for your help.
Best regards
Hi,
SumRunningSum functions are available only for the Text property of labels and table cells.
In Foregroun Color property you could try to use a PixelPerfect aggregation formula like:
Iif(
/* sum of the field Fatturato of current group*/
[][[bPGcB_Level.LevelKey] == [^.bPGcB_Level.LevelKey]]
.Sum([bPGcB_Level.Fatturato])
-
/* sum of the field Fatturato Confronto of current group */
[][[bPGcB_Level.LevelKey] == [^.bPGcB_Level.LevelKey]]
.Sum([bPGcB_Level.'Fatturato Confronto'])
< 0,
'Red', /* if difference is negative */
'Black' /* default color*/
)
Best Regards,
Ruggero