Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
but if you add store dimension
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! 😁
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