Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I need to convert this expression to an instruction set analysis, considering that DiasFin and DiasIni are fields in the associative model and dimensions in the table where I'm adding this expression. Usually I specified in Set Analysis the value or used a variable, but in this case neither method throws me the value I need.
if(FechaDocumento >= Date(today() - num(DiasFin) , 'DD/MM/YYYY') and FechaDocumento <= Date(today() - num(DiasIni) , 'DD/MM/YYYY')
Thanks you!!!!
I think
sum({<FechaDocumento={">=$(=Date(today()-num(DiasFin),'DD/MM/YYYY'))"}*{"<=$(=Date(today() - num(DiasIni) , 'DD/MM/YYYY'))"}>}Value)
Will solve your need
Try this if the other doesn´t work:
sum({<FechaDocumento={'>=$(=Date(today()-num(DiasFin),'DD/MM/YYYY')) <=$(=Date(today() - num(DiasIni) , 'DD/MM/YYYY'))'}>}Value)
Regards
Thanks for your help, but It don´t work. With If the result is this:
but with the expressions sent the result always is 0.
Note that the solutions work when I have a selected range (DiasFin. DiasIni) but when I select multiple ranges shows 0. I hope you can help me.
Thanks you.
May be you could explain in more detail how are you doing the selections and what values have each field after that selections but as I understand your problem I think that if you want to select more than one range of dates you need to have one pair of fields for each range but you can´t make more than one selection for DiasFin or DiasIni, you should have DiasFin2, DiasIni2 to make another selection and add both ranges of dates to the expression.
sum({<FechaDocumento={'>=$(=Date(today()-num(DiasFin),'DD/MM/YYYY')) <=$(=Date(today() - num(DiasIni) , 'DD/MM/YYYY'))'}>}Value)
+
sum({<FechaDocumento={'>=$(=Date(today()-num(DiasFin2),'DD/MM/YYYY')) <=$(=Date(today() - num(DiasIni2) , 'DD/MM/YYYY'))'}>}Value)
Regards
Hi,
Try this
=sum({<FechaDocumento={">=$(=Date(today()-max(DiasFin),'DD/MM/YYYY')) <=$(=Date(today() - max(DiasIni) , 'DD/MM/YYYY'))"}>}Value)
Hope this should work.
Regards,
Jagan.