Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
punitpopli
Specialist
Specialist

Default selection on a field in Qlik Sense

Hi Experts,

I am working on a functionality where I need to add a default selection based on the month we are in to a period field which has values like 2021 Q1, 2021 Q2, 2021Q3, 2021 Q4 and others

As we are in Aug so the field should get selected with "2021 Q3" automatically when the user log in. Below is the expression am using but its not working

[Field Period] = {$(=Year(today()) &'Q' & Ceil(Month(today())/3))} - the filed name has a space in it and cannot be changed 

Have tried using the expression in a variable and using the variable like below - 

  • vPeriodSelection = Year(today()) &'Q' & Ceil(Month(today())/3)
  • ="=[Field Period]='$(=$(vPeriodSelection))'"

Any help on this will be greatly appreciated!

thanks in advance

 

1 Solution

Accepted Solutions
punitpopli
Specialist
Specialist
Author

I am able to achieve the desired result using concat function, refer below expression - 

"=[Field Period]=Concat(Year(today())&' Q'&Ceil(Month(today())/3),' ')"

 

This is working as expected and have added this is bookmark which will allow the latest period selection when user lands on the screen

View solution in original post

3 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @punitpopli ,
First I suggest you to search for your expression in the field to check if it is correct or not.
Then I'd create a bookmark for it.
Best Regards

punitpopli
Specialist
Specialist
Author

Thank you for your response. I did validated it and was not working as expected.

Hence posted the expression in the forum

punitpopli
Specialist
Specialist
Author

I am able to achieve the desired result using concat function, refer below expression - 

"=[Field Period]=Concat(Year(today())&' Q'&Ceil(Month(today())/3),' ')"

 

This is working as expected and have added this is bookmark which will allow the latest period selection when user lands on the screen