Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
You can have zeros instead of nulls, it seams like this solves the problem (see attached)
today() returns the date of last script reload and not exactly today's date. you need month(today(1))
I changed it but it still has the problem. Thanks for the input anyway.
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.
Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
21 | (13) | - | - | 9 | 15 | 6 | 6 | 6 | 6 | 6 | 6 |
(49) | (35) | (25) | (25) | (21) | (33) | (55) | (62) | (62) | (62) | (62) | (62) |
138 | 99 | 85 | 83 | 72 | 26 | 156 | 156 | 156 | 156 | 156 | 156 |
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?
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.
Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
21 | (13) | - | - | 9 | 15 | 6 | 6 | 6 | 6 | 6 | 6 |
(49) | (35) | (25) | (25) | (21) | (33) | (55) | (62) | (62) | (62) | (62) | (62) |
138 | 99 | 85 | 83 | 72 | 26 | 156 | 156 | 156 | 156 | 156 | 156 |
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.
you think you can post a sample qvw?
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.
maybe (to check, add 2 expression, month(...) and max(month(...)) to see if there is any difference)
if(max(Month(EffectiveDate)) < Month(Today()), '<b>'))