Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
so im trying to do a stock control sheet and to get that i want a bar chart with today stock and -30 days stock
bu everytime i try to get the -30 days stock i keeps giving me the whole stock i have
my set analysis for this is :
Sum({<Date = {"<$(=Date(Today() - 30))"}>} Stock * WAC)
also i tried to do it in the data load as
IF(Date = Date(Today() - 30), 1, 0) AS Is30DaysAgo,
im i doing smothing wrong cuz i tried like everything i only get 0 or the all stock, i just want to get the stock before 30 days for any of the dates i have when the user pick on it will go to that date
here i picked the max date i have now but nothing
Hi, @HAmzehAF
If you only want a value from 30 days ago, then try this
Sum({<Date = {"$(=Date(Today() - 30,'MM/DD/YYYY'))"}>} Stock * WAC)
Or if you want previous 30 days value, then try this
Sum({<Date = {">=$(=Date(Today() - 30,'MM/DD/YYYY'))<=Date(Today(),'MM/DD/YYYY')"}>} Stock * WAC)
If this still doesn't work, you'll have to compare Date to Num format to get Set analysis.
Reply Thanks!
thank you @MeehyeOh ,
okay this one is working and i get the before 30 days value for the max date i have rn , but when i try to change the date to lets say yesterday i still get the value for the max date i have nothing is changing for it
it should be 10/9/2023 when i pick the 11/7/2023
Because today() is the standard of comparison.
Change Today() to Max(Date). It might be working you want.
Reply! thanks~!
@MeehyeOh
not working im getting 0 again
Try this!!!!
Only 30 days ago
Sum({< DATE = {"$(=Date(Max(DATE)-30,'MM/DD/YYYY'))"}>}Stock * WAC)
For previous 30 days
Sum({< DATE = {">=$(=Date(Max(DATE)-30,'MM/DD/YYYY'))<=$(=Date(Max(DATE),'MM/DD/YYYY'))"}>} Stock * WAC)
Reply!!Thanks!
Why...Why not working..these chart expressions worked in my test ,,
그럼 표현식에서 'MM/DD/YYYY'만 삭제해봅시다
Delete "MM/DD/YYYY" from the expression. then if that doesn't work, can you send me the sample data? I really want to work this out.
reply thanks~!
@MeehyeOh thanks for the reply,
as u can see here i only get the max date for the sample date its hard to give one with the data im using