Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Flag linking problem

hi all,

PFA

i have a holiday list

through which i have calculated  Net working days and all required things

then i i have created a calender  for this year  and using them in creating flag

but am getting one problem when taking holiday using apply map am not getting it correctly for For my Flag festival

when i select a State from dimension And then when i select Festival from Flag then it show very few dates or Count of Date

am think that this is apply map problem

how to solve it and how to create three flags? for my datei

flags = festival,

           weekday,

          weekend

Thanks in advance

1 Solution

Accepted Solutions
MVP
MVP

please check this one...

View solution in original post

15 Replies
Partner
Partner

Hi

You can try attached file

Apply map is not necessary

Regards

Manesh

MVP
MVP

I haven't tried but you can try using below script..

Temp:

Mapping LOAD

  State,

    Date(Dates,'DD-MM-YYYY') as Dates

FROM

fest.xlsx

(ooxml, embedded labels, table is Sheet2);

//======================================================

Data:

LOAD State,

     HoliDay,

     Date(Dates,'DD-MM-YYYY') as Dates

FROM

fest.xlsx

(ooxml, embedded labels, table is Sheet2);

//======================================================

Join(Data)

Date_genration:

LOAD

  Date(YearStart(Today()) + RecNo() - 1) as Dates

AutoGenerate Ceil(YearEnd(Today())) -YearStart(Today());

NoConcatenate

FinalTable:

Load

  State,

  Dates,

IF(IsNull(HoliDay) and WeekDay(Dates) = 'Sat', 'WeekEnd',

  IF(IsNull(HoliDay) and WeekDay(Dates) = 'Sun', 'WeekEnd',

  IF(Not IsNull(HoliDay), 'Festival',

  'WeekDay'))) as flag_D

Resident Data;

Drop Table Temp;

MVP
MVP

Little update in the If statement is you want to calculate Festivals which are falling in WeekEnds.

IF(IsNull(HoliDay) and WeekDay(Dates) = 'Sat', 'WeekEnd',

  IF(IsNull(HoliDay) and WeekDay(Dates) = 'Sun', 'WeekEnd',

  IF(Not IsNull(HoliDay) and WeekDay(Dates) = 'Sat', 'WeekEndFestival',

  IF(Not IsNull(HoliDay) and WeekDay(Dates) = 'Sun', 'WeekEndFestival',

  IF(Not IsNull(HoliDay), 'Festival','WeekDay'))))) as flag_D

Not applicable

but now when we select any state it does not gives any data about Week days and week ends

MVP
MVP

Please check enclosed file.

Hope this will help you

MVP
MVP

Hi, have you tried this?

Not applicable

tried we need only three flags,

festival, weekend, Weekday, 

how to get that

and Calculation of holidays per state not comming Correct

MVP
MVP

Let me know is it working for you or not?

Not applicable

no its not working