Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
I try to change the text color via an IF condition:
=if(
Budget = 'Yearly' and Calendar.MonthNum='12', white(), black()
)
But this code is ignoring the case if MonthNum is 12. Any ideas?
Thanks, Tom
@TomBond77 , what about this?
Data:
Load * INLINE [
Calendar.MonthNum, Amount, Type
1, 100,a
2, 50,b
3,100,a
4,50,a
5,10,a
6,50,b
7,100,b
8,50,b
9,100,a
10,50,b
11,30,a
12,40,b
];
exit script;
color :
=if(SubStringCount(Concat(Calendar.MonthNum, '|'), '12') > 0 , white(), black())
Hi @TomBond77 , maybe this?
=if(
Budget = 'Yearly' and num(Calendar.MonthNum) = 12, white(), black()
)
Hi QFabian
There is a filter on MonthNum. If Jan up to Nov is filtered, the cell should be white. If the last month comes additionally into the filter the cell value should give black. Any ideas?
=if(Budget = 'Yearly' , if(num(Calendar.MonthNum)>=1 and Num(Calendar.MonthNum)<12 , white(), black()))
This only works if MonthNum is an element of the table, etc. Our filter is based on dimension Month (like Jan, Feb, ...Dec). Is there another function to use Calendar.Month as dimension?
@TomBond77 , what about this?
Data:
Load * INLINE [
Calendar.MonthNum, Amount, Type
1, 100,a
2, 50,b
3,100,a
4,50,a
5,10,a
6,50,b
7,100,b
8,50,b
9,100,a
10,50,b
11,30,a
12,40,b
];
exit script;
color :
=if(SubStringCount(Concat(Calendar.MonthNum, '|'), '12') > 0 , white(), black())
Thank, brilliant!