Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Text Formatting on Pivot Table

I'm trying to do a conditional formatting on a Pivot Table where one of the dimensions is the Months.  I'd like to have the past months to be in bold font.  Somehow, it's partly doing it with this:

if(Month(EffectiveDate) < Month(Today()), '<b>'))

It works partly because in some selections, some (yes, just some) of the past months is not showing as bold.  Not sure what I'm missing.

Please help!  I'm a newbie!

1 Solution

Accepted Solutions
gmoraleswit
Partner - Creator II
Partner - Creator II

You can have zeros instead of nulls, it seams like  this solves the problem (see attached)

View solution in original post

17 Replies
Anonymous
Not applicable
Author

today() returns the date of last script reload and not exactly today's date. you need month(today(1))

Not applicable
Author

I changed it but it still has the problem.  Thanks for the input anyway.

Not applicable
Author

I noticed that it's not changing to bold if the the value of the first row is zero.  Mar and Apr should be bold. Jul to Dec is correct as regular.

JanFebMarAprMayJunJulAugSepOctNovDec
21(13)--915666666
(49)(35)(25)(25)(21)(33)(55)(62)(62)(62)(62)(62)
1389985837226156156156156156156
Anonymous
Not applicable
Author

no problem.

did you try adding a column for Month(EffectiveDate) and may be even one for EffectiveDate to see what value it is returning for the rows where the past months are not showing as bold?

Not applicable
Author

I noticed that it's not changing to bold if the the value of the first row is zero.  Mar and Apr should be bold. Jul to Dec is correct as regular.

JanFebMarAprMayJunJulAugSepOctNovDec
21(13)--915666666
(49)(35)(25)(25)(21)(33)(55)(62)(62)(62)(62)(62)
1389985837226156156156156156156
Not applicable
Author

If i switched the first and second rows, then the Mar and Apr becomes bold and solves the problem.  But I don't want to switch rows.  It seems like it's basing it on the values of the first row.

Anonymous
Not applicable
Author

you think you can post a sample qvw?

Not applicable
Author

it's kinda tough to create a sample since there's a lot of tables basing it from.  makes me thinkg that the problem may lie in the model.

maxgro
MVP
MVP

maybe (to check, add 2 expression, month(...) and max(month(...)) to see if there is any difference)

if(max(Month(EffectiveDate)) < Month(Today()), '<b>'))