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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

working with dates

Hi guys,

I want to do a calculation and with a date condition, but as usual i have a format date problem,

Count(DISTINCT{<[SALESID]={'PV0***'},

FirstOrder_month=CalendarMonthandYear,

Order_Number={'1'},ESTADO_PEDIDO=>} CUSTACCOUNT)

FirstOrder_month is formated DD/MM/YYY for example: 30/09/2015

CalendarMonthandYear is sept-2015

Anyone can help to me to equalize the data

many thank's guys

Eduard    

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Eduard,

first of all, if your CalendarMonthandYear is a string field, you should transform it into a proper Date field, even if you want it to be formatted as "Sep-2015". I'm not sure you can make it look like "Sept-2015", because date format MMM returns a 3-character name, and MMMM returns the full month name, e.g. September.

Once you formatted the field as a date field, you can use the Advance Search syntax to overcome the difference in formatting. Something like this should work:

FirstOrder_month={"=MonthStart(FirstOrder_month)=MonthStart(CalendarMonthandYear)"}

Check out my new book QlikView Your Business - in it, I describe in detail how to work with Dates in Set Analysis, and how to use Advance Search for various purposes.

cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

jduarte12
Partner - Creator II
Partner - Creator II

Hello.

I think this post may help you:

The Date Function

Regards,

João Duarte

Digvijay_Singh

Something like this may be -

Count(DISTINCT{<[SALESID]={'PV0***'},

FirstOrder_month={'$(=Date(MonthStart(Date#(purgechar(CalendarMonthandYear,'t'),'MMM-YYYY')),'DD/MM/YYYY))'},

Order_Number={'1'},ESTADO_PEDIDO=>} CUSTACCOUNT)

ecabanas
Creator II
Creator II
Author

Hi guys

Maybe I explained wrong,

Count(DISTINCT{<[SALESID]={'PV0***'},

FirstOrder_month=Monthend,

Order_Number={'1'},ESTADO_PEDIDO=>} CUSTACCOUNT)

FirstOrder_month is formated DD/MM/YYY and monthend

CalendarMonthandYear is YYY/MM/DD