Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display message per selection

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.

161 Replies
Not applicable
Author

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

Digvijay_Singh

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.

Not applicable
Author

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.

Digvijay_Singh

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 -

Not applicable
Author

You did not attach the sample yet and the code

Digvijay_Singh

//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;

Anil_Babu_Samineni

Digivjay,

What is the last row with -

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Digvijay_Singh

By mistake pressed ctrl S, it posted half cooked response

Not applicable
Author

I don't understand what you mean "last row with"

Digvijay_Singh

It came due to selection of below, we should uncheck it. -

Capture1.JPG