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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show data for the current month only?

Hello everyone,

I need to create a rule that shows data for the current month only, in some charts of my sheet.

The field of date of my data base is like that:

data.JPG

Anyone could help me to set this rule on QlikView?

Thanks

1 Solution

Accepted Solutions
johnca
Specialist
Specialist

Okay, so you need it to be dynamic. I would create a month field based on your data field in the script

MonthStart(YourDateField) as Month

Then maybe the expression would be

Sum({<Month={$(=Max(Month))}>}YourDataField)

--john

View solution in original post

7 Replies
sunny_talwar

May be use set analysis to restrict the data in those charts which need to be restricted.

johnca
Specialist
Specialist

Hi Rodrigo,

I would set a flag in the script for the current month;

If(MonthStart(YourDateField)= MonthStart(Today()),1,0) as CurrentMonth

Then call it in your chart

Sum({<CurrentMonth={1}>}YourDataField)

--john

Not applicable
Author

Thanks John, it worked.

But when i select from the month filter another month, no data is displayed.

I need that rule only in the first view, when the user open the dashboard.

How can i set the current month on the open trigger?

Thanks

settu_periasamy
Master III
Master III

Hi,

May be try this

Document Properties -> Triggers -> OnOpen -> Add Action -> Select In Field

Field : Your Month Field

Search String :  =Date(Today(),'MMMM/YY')

johnca
Specialist
Specialist

Okay, so you need it to be dynamic. I would create a month field based on your data field in the script

MonthStart(YourDateField) as Month

Then maybe the expression would be

Sum({<Month={$(=Max(Month))}>}YourDataField)

--john

Not applicable
Author

Thanks you all !!

arpita
Contributor III
Contributor III

Can you help with the logic