SOLVED

Check the value of a function

Copper Contributor

Hi all,

 

I have a table that contains all current month days, the days are displayed on each column.

For example, in my B1 cell, I added the following function:

=DATE(Tableau2[Current year],Tableau2[Starting month],1)

Tableau2[Current year] = 2020 and Tableau2[Starting month] = 1 (January)

The cell C1 will contains 

=B1+1

What I need is, if the current day is saturday or sunday, then the cell will be disable or just the background will change. But my problem is that I can't check that with the function IF, I can't verify the value of B1 or C1.

My question is, how can I create a condition to check the value or the result of a function in a specific cell?

 

5 Replies

@spamitovic You may use Conditional Formatting to achieve what you describe. It formats cells based on its displayed content, not the underlying formula. A working example is attached.

@Riny_van_Eekelen Yes but I can apply these conditions only the two first line.

You can check in the attachment, when I try to select all tables, the condition is applied to other cells that are not required.

I need to change the background only for the weekends.

best response confirmed by spamitovic (Copper Contributor)
Solution

@spamitovic  The translation isn't very good but I think what you want is to add '$' in formula as so:

=OR(WEEKDAY(C$3,2)=6,WEEKDAY(C$3,2)=7)

 

@spamitovic Add the dollar signs as @mtarler suggested and it will work.

Screenshot 2020-09-08 at 07.33.06.png

@Riny_van_Eekelen @mtarler 

Thank you so much for your help. Problem solved now.

1 best response

Accepted Solutions
best response confirmed by spamitovic (Copper Contributor)
Solution

@spamitovic  The translation isn't very good but I think what you want is to add '$' in formula as so:

=OR(WEEKDAY(C$3,2)=6,WEEKDAY(C$3,2)=7)

 

View solution in original post