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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis and current expression

Hi, I have a straight table by vendorID and sales of the last three months, for this i m using this set_analysis:

sum({1<Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)

VarMonthsAccum (VARIABLE = 3)

when i select a vendorID, the table is kept without changing, my problem is that I NEED that only the vendorID line was shown, how could i do that?

Thanks in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({1<Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)

That 1 means that all selections are disregarded. So your selection of vendorID is ignored in the expression.

You can replace the 1 with only those fields for which you want the selections to be disregarded. The below expression for example would disregard only selections in the fields MyDim1 and MyDim2:

sum({<MyDim1=,MyDim2=, Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)

If you do not want the expression to ignore selections then you can simply leave out the 1:

sum({< Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({1<Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)

That 1 means that all selections are disregarded. So your selection of vendorID is ignored in the expression.

You can replace the 1 with only those fields for which you want the selections to be disregarded. The below expression for example would disregard only selections in the fields MyDim1 and MyDim2:

sum({<MyDim1=,MyDim2=, Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)

If you do not want the expression to ignore selections then you can simply leave out the 1:

sum({< Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"}>} SALES)


talk is cheap, supply exceeds demand
VishalWaghole
Specialist II
Specialist II

Hi

Try this

sum({$<Date = {">=$(=Date(AddMonths(Max(Date),-3),'MM-DD-YYYY'))"}>}Sales)

Hope it will work

Thanks

Not applicable
Author

That was exactly what was happening, now i delete the "1" and add the field I want to be ignored (PERIOD_NAME)

sum({<Date={">=$(=Date(AddMonths(Max(Date),-$(VarMonthsAccum)+1)))"},PERIOD_NAME=>}  SALES)

Thank you!!