Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
HAmzehAF
Partner - Creator
Partner - Creator

help with Data load

Hello i need help with,

 

so i used to use this to get the stock 3 
if(Stock<=3 and Stock>=0,'1','0') as LowStock 
--

the tables i use this :
PRODUCT,
product,
Store  
Price,
WAC,
"Store",
Stock,
if(Stock<=3 and Stock>=0,'1','0') as LowStock 

----

and as for the set analysis this one:
sum({<LowStock={'1'}, Date={"$(=Max(Date))"}>} Stock)
in a barchart with products as the dimension

and i used to get 3 3 3 3 3 for the products' 
but now im getting more than 3 for Somerson even 18 19 20 

any help with this?  

3 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @HAmzehAF 

i guess that you have more than one record for each product en the table, so it  works for individuals records and not by aggregated.

for example, if you have

LOAD 
if(Stock<=3 and Stock>=0,'1','0') as LowStock,
*
inline [
PRODUCT, STORE, PRICE,Stock
productA,StoreA,100,3
productA,StoreB,100,4
productA,StoreC,100,3
productB,StoreC,100,2
productB,StoreC,100,1
productC,StoreA,100,1
];

 

when you sum by product

RafaelBarrios_0-1695063568661.png

 

but if you add store dimension

RafaelBarrios_1-1695063603635.png

 

hope this helps, if not, paste an example data with the expected result.

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button😁

 

 

HAmzehAF
Partner - Creator
Partner - Creator
Author

Screenshot 2023-09-19 090702.png

sadly i cant with example  cuz i have so many tables but this thing was working fine for me and nothing has changes from the data load+data  ,  any other set analysis for this type of data i can use or what i can do now to get this again

HAmzehAF
Partner - Creator
Partner - Creator
Author