Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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 ?

2 Replies
swuehl
MVP
MVP

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

LOAD

     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

Anonymous
Not applicable
Author

NULL handling in QlikView

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