Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fill a column with color to a pivot table

Hello,

I've got a pivot table:

StoreMonTueWed
Store 11--
Store 2-1-
Store 3--1

And the data is:

StoreDayFlagReason
Store 1Mon1-
Store 2Tue1-
Store 3Wed1-
-Wed1Sick

Question:

I need to fill by color (set a background to a column) where there are "reasons" in my pivot table. It's a column called "Wed".

How can I do it? Is it possible to fill a full (including empty cells) column ? Or just empty cells?

1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Go to chart properties -> Expressions

Open the design options of expression flag (i mean, click the '+' symbol next to the expression) and type in the background option the folloging:

=If(Sum(TOTAL <Day> if(Reason <> '-', 1)), red(), White())


It works form me. Hope it helps!


Jaime



View solution in original post

9 Replies
Anil_Babu_Samineni

Expected result?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

all "empty" cells in the column "Wed" will be red (background color)  It would be nice

P.s. don't make changes in load script (preferably)

Anil_Babu_Samineni

Will you able to share sample QVW to check? I think i understand your question

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I've prepared a sample based on this described example. (I don't have anything else)

I expected expressions/ideas (please don't attache any documents) I would be happy of any ideas.

Anil_Babu_Samineni

Perhaps this?

If(Day='Wed' and IsNull(Flag), Red())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Of course it's the easiest way to use : Day='Wed' but It could be any day

I need to fill by color (set a background to a column) where there are "reasons".

Please focus on "reason" data field.

jaibau1993
Partner - Creator III
Partner - Creator III

Go to chart properties -> Expressions

Open the design options of expression flag (i mean, click the '+' symbol next to the expression) and type in the background option the folloging:

=If(Sum(TOTAL <Day> if(Reason <> '-', 1)), red(), White())


It works form me. Hope it helps!


Jaime



jaibau1993
Partner - Creator III
Partner - Creator III

Note that i had to use

Reason <> '-'


because you filled null reasons as '-'. In case it is a true null value you should use


not IsNull(Reason)


By the way, I attach my solved .qvw


Jaime

Anonymous
Not applicable
Author

It looks great! I will play around with it and hope I'll get the expecting result.

Thanks, Jaime.