Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
HAmzehAF
Partner - Creator
Partner - Creator

Date

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 

 

22 Replies
HAmzehAF
Partner - Creator
Partner - Creator
Author

HAmzehAF_0-1699512779773.png

here i picked the max date i have now but nothing 

MeehyeOh
Partner - Creator
Partner - Creator

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!

HAmzehAF
Partner - Creator
Partner - Creator
Author

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 

HAmzehAF
Partner - Creator
Partner - Creator
Author

HAmzehAF_0-1699513553750.png

it should be 10/9/2023 when i pick the 11/7/2023

MeehyeOh
Partner - Creator
Partner - Creator

@HAmzehAF 

 

Because today() is the standard of comparison.

Change Today() to Max(Date). It might be working you want.

 

Reply! thanks~!

HAmzehAF
Partner - Creator
Partner - Creator
Author

@MeehyeOh 
not working im getting 0 again 

MeehyeOh
Partner - Creator
Partner - Creator

@HAmzehAF 

 

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!

HAmzehAF
Partner - Creator
Partner - Creator
Author

@MeehyeOh thank you again for the reply but still not working 

HAmzehAF_0-1699514345157.png

 

MeehyeOh
Partner - Creator
Partner - Creator

@HAmzehAF 

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~!

HAmzehAF
Partner - Creator
Partner - Creator
Author

@MeehyeOh thanks for the reply, 

HAmzehAF_0-1699515954516.png

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