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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jjordaan
Partner - Specialist
Partner - Specialist

Use variable (which includes a calculation) in set Analysis

Hello everyone,

I'm trying to create a calculations with Set Analyis but I can not make it work.

I need to identify which items has stock in the past 5 weeks but does not  have any sales.

To calculate the Stock I need to summerize all the stock changes.

So purchases 10, Sold 5, Purchases 2 is a stock of 7

I have created a variable called vSellableInventory

Sum({<HFBNo= {$(vSalesHFB)}, CatalogYear=, CatalogYearTertial=, CatalogYearMonth=, CatalogYearWeek=, CatalogWeek=, Tertial=, YearQuarter=, WeeksAgoIndicator= , DateNo= {'<=$(=Max(DateNo))'}>} SellableQty)

No i created a Set Analysis like

=sum({1<CompanyStoreName = P(CompanyStoreName), ItemNo = {"=$(vSellableInventory) > 0"}, ItemNo = {"=$(vQtySales) = 0"},

WeeksAgo = {"<= 5"}>} ItemCounter)

This should give me all the items thats has stock but nu sales in the past 5 weeks, but unfortunatily it does not work.

I hope someone can help me.

Thanks in advance

Labels (1)
0 Replies