Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Date Flag linking problem

please check this one...

15 Replies
Partner
Partner

Re: Date Flag linking problem

Hi

You can try attached file

Apply map is not necessary

Regards

Manesh

MVP
MVP

Re: Date Flag linking problem

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

Re: Date Flag linking problem

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

Re: Date Flag linking problem

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

MVP
MVP

Re: Date Flag linking problem

Please check enclosed file.

Hope this will help you

MVP
MVP

Re: Date Flag linking problem

Hi, have you tried this?

Not applicable

Re: Date Flag linking problem

tried we need only three flags,

festival, weekend, Weekday, 

how to get that

and Calculation of holidays per state not comming Correct

MVP
MVP

Re: Date Flag linking problem

Let me know is it working for you or not?

Not applicable

Re: Date Flag linking problem

no its not working