Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(valmaternité=1,if ([Code d'entreprise]='12',interval(num(Time#('02:00','hh:mm')),'hh:mm'),interval(num(Time#('01:00','hh:mm')),'hh:mm')))
this expression work only if i selected 1 for valmaternité
any help please
clearly, valmaternité has other values before selection, if it is a variable you will have to trigger it to 1
if it is a field, it is a null so you definitely need to select 1.
what exactly are you trying to compute with your formula?
I am thinking you should convert your expression to Set Analysis so you dont have to worry about selecting 1 for valmaternité
Because that's how If statement works.
If condition is fulfilled, then action, else action....
in your case if you select 1 for valmaternité, your formula will work, just as you mentioned.
so how can i make it work without selecting value??
clearly, valmaternité has other values before selection, if it is a variable you will have to trigger it to 1
if it is a field, it is a null so you definitely need to select 1.
what exactly are you trying to compute with your formula?
I am thinking you should convert your expression to Set Analysis so you dont have to worry about selecting 1 for valmaternité
valmaternité is a calculated variable which take 1 if the date is in an interval of time.
i am trying to full the field either of 1 hours or 2 hours and i want it to do this accordind to the date in the table.
Can you post your qv app
this how i obtain valmaternité:
matable:
LOAD
CNI,
[Nom Prénom],
Date,
Min(if([Maternité (Évènements)]=1,date(Date)))as mindate
Resident Année2013
Group by CNI,[Nom Prénom],Date;
outer Join(matable)
LOAD
CNI,
[Nom Prénom],
if(IsNull(mindate),2,if(Date>=mindate and Date<=AddYears(mindate,1),1,0)) as valmaternité
Resident matable;
looks like valmaternité is a field not a variable, therefore, upon load, your expression will not return value, or should i day the condition to which your expression was defined is not fulfilled until you make the selection to 1
Valmaternite is not respecting the interval when it takes 1.
how can i correct this??
for my fist question , it work correctly with a set analysis
Valmaternite is not respecting the interval when it takes 1.
how can i correct this??
I am not sure how I can help on this without in depth analysis of your work.
JP
for my fist question , it work correctly with a set analysis
well its great to know that you made it work with SET ANALYSIS.
JP