Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a requirement , in which I want to show a table with a range of date From and To . Here I am facing issue how to get a true condition i an expression if(Log_Date>$(MaxDate),1,0) . PFA with a sample.
Thank you
Regards
Ferha Sharma
I used Log_Date={">=$(vFromDate)<=$(vToDate)"} in the expression.
Hi
can you be a little more specific with your requirement.
regards
Pradosh
I have a requirement in which I was to pass from date from calendar and to date from calendar and want to display Log date in between from and to dates.
Hi
pfa . is this what you are looking for?
regards
Pradosh
You should avoid formatted dates when doing logic. It is much better and safer to use the numerical version of the date.
For instance in you application you have:
If( Concat(Log_Date) <= $(vMaxDate) , 1 , 0 )
The Concat() function will concatenate as strings the formatted dates that are selected or possible so you get something like this as a result:
02/10/201703/10/201704/10/201705/10/201706/10/2017
This will be interpreted as a calculation consisting of many divisions and the result is:
5.9904817301955e-30
Similarly the $(vMaxDate) will be this if 04/10/217 is selected and that evaluates to this:
0.00019831432821021
And clearly this is not your intention - is it?
To get what you want you will have to do something like this:
If( Max(Log_Date) <= Num( $(vMaxDate ) ) , 1 , 0 )
Hello Pradosh,
Thank for your reply, I need it in a chart as a calculated dimension. Please check when I am using it in a table I am getting false condition.
Thank you
I want the dates between Min and Max as If(log_date <=vMaxDate
and log_date <=vMaxDate,log_date)
Please find attachment.
check this out
regards
Pradosh
I used Log_Date={">=$(vFromDate)<=$(vToDate)"} in the expression.