Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

where clause issue

Hi All,

i have the below code:

LOAD Plant,

     Part_Type,

     Contract_Type,

     BUEqui,

     Country,

     Strategic_Flag,

     YearMonth,

     Fiscal_Month,

     Calendar_Year,

     ITM_Consumption,

     ITM_IB,

     YTD_Consumption,

     YTD_IB,

     YTD_Consumption_LY,

     YTD_IB_LY,

     ADJ_CONS_YTD_LY,

     Country_CR,

     Country_Final_temp,

     Country_Final

FROM

[\..\T1.qvd]

(qvd) where YearMonth = '201712';

when i give this where clause i am getting 0 records and when i remove the where condition i am getting the output..

Can you please tell me where  i am doing wrong..

Thanks,

Bharat

1 Solution

Accepted Solutions
sunny_talwar

How is YearMonth created in the qvd file? May be it is a date field rather than string... try this

Where YearMonth = MakeDate(2017, 12);

View solution in original post

5 Replies
sunny_talwar

How is YearMonth created in the qvd file? May be it is a date field rather than string... try this

Where YearMonth = MakeDate(2017, 12);

keerthika
Creator II
Creator II

Hi,

     YearMonth column is in what format?

bharatkishore
Creator III
Creator III
Author

Thank you sunny bhai it worked.. can you please tell me is it because of string it did not get executed..

sunny_talwar

No, you MonthYear field is a actual date field and you were comparing it to a number. Using MakeDate(), we created a date to compare the date field.

bharatkishore
Creator III
Creator III
Author

Ohh ok. Thank you Sunny Bhai..