Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need help for some calculations.
In my Dashboard I filtered one year of data, and I need to calculate the sum value stock of warehouse that moved > 3 Months, ❤️ Months, > 6 Months and > 12 Months.
How can i do?
Thank you so much.
Francesca
Hi Francesca,
What is the logic to calculate >3Month, <3Month etc??
try this may help you, will give you last three month stock
=sum({< month = { '$((today()-3))'}>}Stockvalue)
thanks
=sum({< month = { '$((today()-3))'}>}Stockvalue)
Abhay, I don't think the above will give him last 3 months stock. Today() - 3 is three days back. Did you forget to add Addmonths??
yeah sory pls add addmonths
=sum({< month = {'$(Addmonths(Today()),-3)'}>}Stockvalue)
I would further adjust it to this:
=Sum({<MonthYear = {"$(='>=' & MonthName(AddMonths(Today(),-3)))"}>} Stockvalue)
Where MonthYear is a field created in the script using MonthName() function
[Master Calendar]:
LOAD Date,
Year,
MonthName(Date) as MonthYear
...
Resident...;
Hi,
Thanks for the post,
=Sum({<MonthYear = {"$(='>=' & MonthName(AddMonths(Today(),-3)))"}>} Amount)
I'm using above measure in a bar chart with dimension as MonthYear and measure column as Amount, but it is not working , showing me a blank chart.
I think,
Set analysis won't work with monthname and <= or >=
use
=Sum({<Datefield= {"$(='>=' & date(AddMonths(Today(),-3)))"}>} Amount)
instead