Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lucky1
Creator
Creator

How to change label name dynamically

Hi I want to show my label name as per the quarter. I am using below expression to show current quarter year in the label.but it is giving error. please help on this.

 

if(Closed_QuarterSerial={'$(=Maxstring(Closed_QuarterSerial))'}),Closed_Quarter_Year)

2 Solutions

Accepted Solutions
vinieme12
Champion III
Champion III

What is the format of the field Closed_QuarterSerial ??

 

Alternative you can try

CurrentQuarter

= Maxstring({<Datefield={'$(=Date(Max(Datefield)))'}>}Closed_QuarterSerial)

 

PreviousQuarter

= Maxstring({<Datefield={'$(=quarterStart(Max(Datefield),-1))'}>}Closed_QuarterSerial)

 

replace Datefield with your actual datefield name

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

Lucky1
Creator
Creator
Author

 

Found solution by writing below code

 

= Maxstring({<Flag={0}, Closed_QuarterSerial= {"$(=Maxstring([Closed_QuarterSerial]))"}>}Closed_Quarter_Year)

View solution in original post

4 Replies
Mark_Little
Luminary
Luminary

Hi there, 

I beleive if you are using an IF in a dynamic dimension name you don't have to follow the Set analysis syntax. Try

if(Closed_QuarterSerial=Maxstring(Closed_QuarterSerial),Closed_Quarter_Year)

Lucky1
Creator
Creator
Author

Hi Mark Tried if(Closed_QuarterSerial=Maxstring(Closed_QuarterSerial),Closed_Quarter_Year)

no luck it is giving null -

vinieme12
Champion III
Champion III

What is the format of the field Closed_QuarterSerial ??

 

Alternative you can try

CurrentQuarter

= Maxstring({<Datefield={'$(=Date(Max(Datefield)))'}>}Closed_QuarterSerial)

 

PreviousQuarter

= Maxstring({<Datefield={'$(=quarterStart(Max(Datefield),-1))'}>}Closed_QuarterSerial)

 

replace Datefield with your actual datefield name

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Lucky1
Creator
Creator
Author

 

Found solution by writing below code

 

= Maxstring({<Flag={0}, Closed_QuarterSerial= {"$(=Maxstring([Closed_QuarterSerial]))"}>}Closed_Quarter_Year)