Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! Thank you first for taking the time to read this, and hope that you will be able to help me!
I am creating a dashboard where I have a variable the variable for dates of purchase and delivery. I separate the 365 days of the year into 52 week segments, and so I would like to see which week segement the date falls into. If you have any ideas on how I can compare one variable to two fields, I would greatly appreciate it! ![]()
Thank you!
what do you want to achieve with this?
use the same logic you used to create the week numbers and compare with week numbers of those dates
Purchasedate = Week($(datevariable1))
Deliverydate = Week($(datevariable1))
Thank you Vineeth for your response!
Do you think that there is any way I could make this work using the trigger function? I would like to be able to plug in into a input box, the week number (or a specific day of the month) and then it only shows me the furniture bought inbtw in that period. The period will be dictated by pre-set definitions of what week is what period.
Thanks so much!
Can you provide sample app / data?
Hi,
one solution without the need for variables or triggers might be:
or
//creation of sample data
tabSales:
LOAD *,
DayName(PurchaseDate+Pow(Rand(),3)*100) as DeliveryDate;
LOAD RecNo() as ID,
DayName(YearStart(Today())+Rand()*265) as PurchaseDate
AutoGenerate 20;
tabCalendar:
LOAD *,
Day(Date) as Day,
WeekDay(Date) as WeekDay,
Week(Date) as Week,
WeekName(Date) as WeekName,
Month(Date) as Month,
MonthName(Date) as MonthName,
Dual('Q'&Ceil(Month(Date)/3),Ceil(Month(Date)/3)) as Quarter,
QuarterName(Date) as QuarterName,
Year(Date) as Year,
WeekYear(Date) as WeekYear;
LOAD Date(MinDate+IterNo()-1) as Date
While MinDate+IterNo()-1 <= MaxDate;
LOAD Min(PurchaseDate) as MinDate,
Max(DeliveryDate) as MaxDate
Resident tabSales;
tabLink:
IntervalMatch (Date)
LOAD Distinct
PurchaseDate,
DeliveryDate
Resident tabSales;
hope this helps
regards
Marco
Hi ,
Can you share sample documents.