Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Restricting data loaded using where clause

Hi Friends

I need to stop records  where the CR Month = to PF month from being loaded. How this is achieved?. If I do not create two fields such as CR Month & PF Month, from the same data fields such as period from & credit note month,how this done with the where clause. Also I wish to know, the formula to use at the front end too.

Thanks a lot in advance

Neville

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Just use a function that returns the correct granularity, e.g. Monthname()

Where Monthname(CREDIT_NOTE_DATE) <> Monthname(PERIOD_FROM) ;


https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...


And take care to get your dates right:

Get the Dates Right

Why don’t my dates work?

View solution in original post

5 Replies
swuehl
MVP
MVP

Try using the Month() function in your WHERE clause

Where Month(CREDIT_NOTE_DATE) <> Month(PERIOD_FROM) ;

nevilledhamsiri
Specialist
Specialist
Author

Thank you very much  Sir, It is fine. Kindly note that if there is a record such as below where Month is same but Year is different (2017 vs 2018) in such cases still I need to show such records as long as Year if different. Please see how this condition too be included in the where clause

Neville

    

CREDIT_NOTE_NOCREDIT_NOTE_DATEPERIOD_FROMPERIOD_TOPREMIUM
RA0018C001000018-Jan-186-Jan-175-Mar-176797.5
nevilledhamsiri
Specialist
Specialist
Author

Actually the above record rather looks like below!

CREDIT_NOTE_NOCREDIT_NOTE_DATEPERIOD_FROMPERIOD_TOPREMIUM
RA0018C001000018-Jan-186-Jan-175-Jan-176797.5
swuehl
MVP
MVP

Just use a function that returns the correct granularity, e.g. Monthname()

Where Monthname(CREDIT_NOTE_DATE) <> Monthname(PERIOD_FROM) ;


https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...


And take care to get your dates right:

Get the Dates Right

Why don’t my dates work?

nevilledhamsiri
Specialist
Specialist
Author

Thank you very much sir,

This is done & achieved