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
anyhelp?
Try this
=Sum({$<Date = {"<=$(=Date(Today()-30)))"} >} Stock * WAC)
thank you for the reply but still im getting 0 when i use this ,
i tried to just check the date before 30 days to see if i have data and yes i do but i get 0
Maybe trying with the appropriate date format.
=Sum({$<Date = {"<=$(=Date(Today()-30,'DD/MM/YY')))"} >} Stock * WAC)
Try to replace date something like below,
Date={">=$(=Date(AddMonths(max(Date),-1)))<=$(=Date(max(Date)))"}>}
Complete expression:
Sum({<Date={">=$(=Date(AddMonths(max(Date),-1)))<=$(=Date(max(Date)))"}>}
Stock * WAC)
Hi, @HAmzehAF
I think it might be different date format between two field.
What is [Date] field date format?
hello everyone thank you,
but still nothing is working
date is like this , 10/25/2023
In order to do larger than or smaller than comparisons your date field needs to be recognised as a date (that is having a numeric underlying value).
It could be that your dollar expansion result is interpreted as an expression, eg 2023-10-09 can be interpreted as equal to 2004 and not the date value. Try this
Sum({<Date = {"<'$(=Date(Today() - 30))'"}>} Stock * WAC)
OR
Sum({<Date = {"<$(=num(Today() - 30))"}>} Stock * WAC)
still nothing ,
when i use this i get the max date and works fine
Sum({<Date={"$(=max(Date))"}>}Stock*WAC)
@Vegar