Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Brauliodf
Contributor II
Contributor II

Condicionante para cores

Boa tarde à todos!

Estou precisando usar alguma função parecida com while para rodar a seguinte expressão para mudança de cor de campo

if([DAT_TER_EXA]>=DAT_INI_EXA, Yellow(),green())

DAT_TER_EXA - Data término do exame

DAT_INI_EXA - Data início do exame

preciso que rode isso até DAT_TER_EXA for menor ou igual ao dia atual.

Desde já agradeço a ajuda

Labels (3)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Try

if(Today()<=[DAT_TER_EXA] and DAT_INI_EXA<=Today(), Yellow(),green())

View solution in original post

4 Replies
hic
Former Employee
Former Employee

What iterator do you want to use? Should this expression be evaluated once per Exam, once per Student, once per Customer, once per Product, or what? Without the iterator, it is impossible to answer the question.

Let's assume that you want it once per ExamID. Then you can probably make a chart with ExamID as dimension and
   if(DAT_TER_EXA>=DAT_INI_EXA, Yellow(),green())
as color expression.

Or
Aggr(if(DAT_TER_EXA>=DAT_INI_EXA, Yellow(),green()),ExamID)

But this assumes that there is only one DAT_TER_EXA and only one DAT_INI_EXA per ExamID. Otherwise you need aggregation functions, e.g.
   if(Max(DAT_TER_EXA)>=Min(DAT_INI_EXA), Yellow(),green())

Brauliodf
Contributor II
Contributor II
Author

Hello @hic 

First, sorry for the delay in feedback.

I really need that while a date range is occurring, the field color changes. Example:

01/04/2022 to 07/04/2022

If today is between these dates, the field should be colored yellow, otherwise white.


Best Regards!
hic
Former Employee
Former Employee

Try

if(Today()<=[DAT_TER_EXA] and DAT_INI_EXA<=Today(), Yellow(),green())

Brauliodf
Contributor II
Contributor II
Author

Thanks !