2 Replies Latest reply: Apr 26, 2017 12:15 PM by Robin Hausdörfer

# Need urgent help for this script

 Avg({\$< [Type Facture]={'Avoir'}, ([Fact. Mt MO] + [Fact. Mt D] + [Fact. Mt RF] + [Fact. Mt FV] + [Fact. Mt FA] + [Fact. Mt FD] + [Fact. Mt A] ) = {">=\$(=vMt_FT_Min) <=\$(=vMt_FT_Max) >=\$(=vMt_FT_Max_1) <=\$(=vMt_FT_Min_1)"}

>}

 [Fact. Mt MO] + [Fact. Mt D] + [Fact. Mt RF] + [Fact. Mt FV] + [Fact. Mt FA] + [Fact. Mt FD] + [Fact. Mt A]

)

This instruction is not working. Can someone urgently help me ?

• ###### Re: Need urgent help for this script

Create a new field in your load script with the sum of

Rangesum([Fact. Mt MO], [Fact. Mt D], [Fact. Mt RF], [Fact. Mt FV], [Fact. Mt FA], [Fact. Mt FD], [Fact. Mt A]) as FactSum,

...

Then use this field in your set expression

 Avg({\$< [Type Facture]={'Avoir'}, FactSum = {">=\$(=vMt_FT_Min) <=\$(=vMt_FT_Max) >=\$(=vMt_FT_Max_1) <=\$(=vMt_FT_Min_1)"}

>}

 FactSum

)

edit: and I think your numeric search should only contain one range (only once >= and <=):

">=\$(=vMt_FT_Min) <=\$(=vMt_FT_Max) >=\$(=vMt_FT_Max_1) <=\$(=vMt_FT_Min_1)"

Not sure what you want to do here, but I believe the current search will not work as intended

• ###### Re: Need urgent help for this script

NULL handling in QlikView

null()+x = null() ...