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

Announcements
Solving the Informatica Dilemma: On-Demand Briefing - Watch On Demand!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Saturday & Sunday

Hi Experts,

I have data like this

   

IDCustomernameDateSales
1A01-01-2016100
4D04-01-2016400
5E05-01-2016500
6F06-01-2016600
7G07-01-2016700
8H08-01-2016800
11k11-01-20161100
12l12-01-2016

1200

in source i have excluded Saturday & Sunday dates, but i am getting Saturday & Sunday dates in variable 

i don't want Saturday & Sunday

Please check here 09-01-2016,10-01-2016 not in source ,but showing in variables

Untitled.png

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

Please find the solution

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

22 Replies
tamilarasu
Champion
Champion

Hi Mahesh,

Define your variable formula like below,


vMax:    =Max(DateField)

vMax1:    =Max(DateField,1)

vMax2:    =Max(DateField,2)

vMax3:    =Max(DateField,3)


If the result is number, add date function i.e =Date(Max(DateField),'DD-MM-YYYY').

qlikview979
Specialist
Specialist
Author

Hi Bro,

I Tried like that it showing  like below

vMax:    =12-01-2016

vMax1:    =1

vMax2:    =2

vMax3:    =3

Regards

HirisH_V7
Master
Master

Hi,

What the logic your'e using in ,

vMax2

    &

vMax3

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
qlikview979
Specialist
Specialist
Author

Hi Bro,

is it possible to write any  condition here...... i marked there check onceUntitled.png

qlikview979
Specialist
Specialist
Author

Hi ,

Vmax----> max data


Vmax---->  previous data

Vmax---->2  previous data

Vmax----> 3  previous data


i need


Exclude Saturday,Sunday dates.

tamilarasu
Champion
Champion

Seems you have entered wrong expression.

=Date(Max(Date),1)


Correct expression should be


=Date(Max(Date,1))

qlikview979
Specialist
Specialist
Author

Hi Bro,

I want Dynamically for Example

if  i click on 07-01-2016

that is my max date

then

07-01-2016  previous

06-01-2016   second previous

05-01-2016  third previous


like this i need

qlikview979
Specialist
Specialist
Author

Hi Experts,

Can any one Help me

stalwar1swuehlkush141087avinashelite

Regards

HirisH_V7
Master
Master

Hi,

May be like this , using your sample data,

Temp:

LOAD * ,

WeekDay(Date) as Day

INLINE [

    ID, Customername, Date, Sales

    1, A, 01/01/2016, 100

    4, D, 04/01/2016, 400

    5, E, 05/01/2016, 500

    6, F, 06/01/2016, 600

    7, G, 07/01/2016, 700

    8, H, 08/01/2016, 800

    11, k, 11/01/2016, 1100

    12, l, 12/01/2016, 1200

    13, m, 09/01/2016, 1100

    14, n, 10/01/2016, 1200

];

NoConcatenate

Data:

Load *

Resident Temp where Day<>'Sat'and Day<>'Sun' ;

Drop table Temp;

At Front End,

Variable Expressions,

vMaxDate1=Date(Max(Date,2),'DD/MM/YYYY') ,


Follows Like this

Exclusion  of Saturday and Sunday-227459.PNG

PFA,

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”