Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have this set analisys in my expression:
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}> * (<STATO_OUT={'SCADENZA'}> + <STATO_OUT={'CESSATO'}>)} CONSUMO_TOT_ANNUO) |
The problem is i want to do an AND operator from this:
<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}> * <STATO_OUT={'SCADENZA'}>
And an OR operator from this:
<STATO_OUT={'SCADENZA'}> + <STATO_OUT={'CESSATO'}>
But in the way i did it it not works; it only take me only the STATO_OUT='SCADENZA' does not consider STATO_OUT='CESSATO'
where is the problem?
thanks
If you want to get set analysis for a pseudo expression like this:
(Date1 < DATA_OUT <= Date2) AND (STATO_OUT = 'SCADENZA' OR STATO_OUT = 'CESSATO')
then write your actual expression like:
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}> + <STATO_OUT={'SCADENZA', 'CESSATO'}>} CONSUMO_TOT_ANNUO)
or even simpler (relying on the implicit behavior of set analysis):
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}, STATO_OUT={'SCADENZA', 'CESSATO'}>} CONSUMO_TOT_ANNUO)
If this is not what you want, then please provide an example using field values and required output.
If you want to get set analysis for a pseudo expression like this:
(Date1 < DATA_OUT <= Date2) AND (STATO_OUT = 'SCADENZA' OR STATO_OUT = 'CESSATO')
then write your actual expression like:
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}> + <STATO_OUT={'SCADENZA', 'CESSATO'}>} CONSUMO_TOT_ANNUO)
or even simpler (relying on the implicit behavior of set analysis):
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}, STATO_OUT={'SCADENZA', 'CESSATO'}>} CONSUMO_TOT_ANNUO)
If this is not what you want, then please provide an example using field values and required output.
The first expression not work, but work the second:
Sum({<DATA_OUT={">$(=Date($(vFineMonthContrAlt), 'DD/MM/YYYY'))<=$(=Date($(vFineMonthContrAltSCAD), 'DD/MM/YYYY'))"}, STATO_OUT={'SCADENZA', 'CESSATO'}>} CONSUMO_TOT_ANNUO)
thanks