Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cmano
Creator
Creator

Create today / current month of current year button

Hello guys.

I am new at qlikview .

I have data from 2021 & still going on.

I want to create a button that it will take data from the current month of the current year.

Any suggestion?

thank you for your time.

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Master
Master

Format in script like this;

Date(Timestamp#(Created,'DD-MM-YYYY hh:mm:ss[.fff] TT'),'DD/MM/YYYY')  AS  [Created Date]

Then use it in the search string as such;       ='>=' & Date(Max([Created Date]))

View solution in original post

8 Replies
BrunPierre
Master
Master

See attached.

cmano
Creator
Creator
Author

Hello my friend i can not open the file.

I am using qlikview.

Thank you.

BrunPierre
Master
Master

Re-download it again, I've changed it from .qvf to .qvw

cmano
Creator
Creator
Author

Hello again.

I cant figure out but its not working.

that's my script:

SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';


Stories:
LOAD Item,
Type,
[Inspection(s) Type],
Title,
Status,
Created,
Revised,
Closed,
Resources,
Elapsed,
[Number of Items],
Product,
Application,
[Applicable Specification],
Form,
[Material Description],
[Material Designation],
[Material Temper],
[Outer Diameter (mm)],
[Wall Thickness (mm)],
Customer,
[Origin of Manufacturer],
Manufacturer,
[Reported By],
Day(Created) as Day,
Num(Month(Created)) as Month,
Year(Created) as Year

the only change i make is this:

='>=' & Date(Max(Created))

//='>=' & Date(MonthStart(Max({1}Date)), 'MM/DD/YYYY') & '<=' & Date(MonthEnd(Max({1}Date)), 'MM/DD/YYYY')

 

And nothing happens.

What do you think?

BrunPierre
Master
Master

I believe the 'Created' is a date field? If so, What is the date format?

cmano
Creator
Creator
Author

I just checked :

Created is a date time filed e.g : 05-08-2022 1:16:01 PM

In that case?

BrunPierre
Master
Master

Format in script like this;

Date(Timestamp#(Created,'DD-MM-YYYY hh:mm:ss[.fff] TT'),'DD/MM/YYYY')  AS  [Created Date]

Then use it in the search string as such;       ='>=' & Date(Max([Created Date]))

cmano
Creator
Creator
Author

Hello my friend again. I have an issue.

The script as you mentioned:

SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';


Stories:
LOAD Item,
Type,
[Inspection(s) Type],
Title,
Status,
Created,
Revised,
Closed,
Resources,
Elapsed,
[Number of Items],
Product,
Application,
[Applicable Specification],
Form,
[Material Description],
[Material Designation],
[Material Temper],
[Outer Diameter (mm)],
[Wall Thickness (mm)],
Customer,
[Origin of Manufacturer],
Manufacturer,
[Reported By],
Day(Created) as Day,
Num(Month(Created)) as Month,
Year(Created) as Year,
Date(Timestamp#(Created,'DD-MM-YYYY hh:mm:ss[.fff] TT'),'DD/MM/YYYY') as [Created Date]

Created is a date time filed e.g : 05-08-2022 1:16:01 PM

At button i have the below :

Actions :   

                 Select in Field

Field : 

              [Created Date]

Search String:  

                ='>=' & Date(Max([Created Date]))

                 //='>=' & Date(MonthStart(Max({1}Date)), 'MM/DD/YYYY') & '<=' & Date(MonthEnd(Max({1}Date)), 'MM/DD/YYYY')

 

Its seems that i have not interaction with the graph

thank you again