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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Phara
Contributor III
Contributor III

Select a previous period automatically

Hello,

I have a dimension called ''Exercice période'' in French which mean Period exercice. I want to systematically select the previous month of the period, as an example, we're in November, and when the sheet opens, I want it  to select October automatically. Please note that I already have a Favorite applied on the sheet.

Any expression for that please?

Phara_1-1730492580180.png

Thank you so much

Labels (3)
3 Replies
rubenmarin

Hi, you can use the sheet actions to select a value on a field.

With sheet on edit mode go to actions -> Select values on a field -> select the field -> set the expression for the value, it could be =MonthName(AddMonths(Today(),-1)). Or =Date(AddMonths(Today(),-1),'MMM. YYYY')

 

anat
Master
Master

Muthukumar_77
Contributor III
Contributor III

You can try this in Sheet action,

=Date(AddMonths(Max(Date#([Exercice période],'MMM YYYY')),-1),'MMM YYYY')

or

=Date(AddMonths(Today(),-1),'MMM YYYY')

Thanks Regards,
Muthukumar P
Qlik Developer