Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
From the table below the goal is to have sales every month for all the shops shown on the right. But if for example when selecting a shop in this case Hilltop 58 and there are months without any sales as in the case of Mar, Jun, Oct and Dec, then a message should be displayed saying " There were no sales in the months of Mar, Jun, Oct and Dec for Hilltop 58".
Please any help on how to achieve these will be great.
Month Sales
Jan € 2,500,25
Feb € 1,252,00
Mar
Apr € 500.25
May € 3,500,95
Jun
Jul € 4,652,85
Aug € 10,458,87 SHOPS
Sep € 15,896,45 Hilltop 58
Oct T- Square 45
Nov € 25,875,65 Spring bell 38
Dec Down beach 10
Coastal city 5
Thanks in advance.
Hey Digvijay,
Please I also have these other example as shown below: I am expecting customers to pay their debt every month. But as you can see for certain months they did not pay and those months are not in the database. So per customer selection, I will like to see a message with the months that no payments were made. Please help me out.
Month Receivable
Jan € 500
Apr € 7000
May € 350
Jun € 550
Aug € 635
Oct € 780
Nov € 900
First thing, you need to create master calendar using min and max date, that way you can have all the months in your database, let me know if you don't have, I can share sample with you.
Please do share the sample that will be great because I don't have it and I don't know how to go about it.
You need to write below code at the end of your script, take help from attached sample and the below code, it should not be tough if you can customize format of your date properly -
You did not attach the sample yet and the code
//Create EnrollDate Calendar
MinMax_EnrollDate:
Load
Min(EnrollDate) as MinDate_EnrollDate,
Max(EnrollDate) as MaxDate_EnrollDate
Resident OnlineCourseEnrollment;
Let vMinDate_EnrollDate = Peek('MinDate_EnrollDate',0,'MinMax_EnrollDate');
Let vMaxDate_EnrollDate = Peek('MaxDate_EnrollDate',0,'MinMax_EnrollDate');
Let vDiff = vMaxDate_EnrollDate - vMinDate_EnrollDate + 1;
EnrollCalendar:
Load *,
Date(MonthStart(EnrollDate),'YYYY-MM') as Enroll_YearMonth,
Enroll_Year & '-' & Enroll_Quarter As Enroll_YearQuarter,
Enroll_WeekYear & '-' & Num(Enroll_Week,'00') as Enroll_YearWeek;
Load
Date(EnrollDate,'YYYY-MM-DD') as EnrollDate,
Year(EnrollDate) as Enroll_Year,
Month(EnrollDate) as Enroll_Month,
Day(EnrollDate) as Enroll_Day,
Week(EnrollDate) as Enroll_Week,
'Q' & ceil(Month(EnrollDate)/3) as Enroll_Quarter,
WeekYear(EnrollDate) as Enroll_WeekYear;
Load
RecNo()-1+$(vMinDate_EnrollDate) as EnrollDate
AutoGenerate($(vDiff));
Drop table MinMax_EnrollDate;
Digivjay,
What is the last row with -
By mistake pressed ctrl S, it posted half cooked response
I don't understand what you mean "last row with"
It came due to selection of below, we should uncheck it. -