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: 
Not applicable

Advanced Label to match expression

Hi all, I'm try to get a correct label together to tell the use exactly what the set analysis is currently doing.

So for the label I currently have:

='Sales ' & Max(Year)

  & chr(10) &  MinString(Month) & '-' & MaxString(Month)

So without ANY (on year or month) selections it shows Sales 2015 Jan-Dec. Now we all know that currently there are no more than 3 months in 2015 so far. So I would like it to show Sales 2015 Jan-Mar instead! The expression is already doing exactly that, but if the user has no selections the label shows something incorrect with respect to the expression.

Can somebody help me out on this?

Thanks,

Coen

1 Solution

Accepted Solutions
sunny_talwar

Maybe this

='Sales ' & Max(Year)

  & chr(10) &  MinString(Month) & '-' & MaxString({<Year = {'$(=Max(Year))'}>}Month)

The set analysis within the last MaxString will only show the max month for the maximum year which would be 2015 in your case.

HTH

Best,

S

View solution in original post

4 Replies
Not applicable
Author

Drop in a monthend(Today()) or similar for the Max value..

sunny_talwar

Maybe this

='Sales ' & Max(Year)

  & chr(10) &  MinString(Month) & '-' & MaxString({<Year = {'$(=Max(Year))'}>}Month)

The set analysis within the last MaxString will only show the max month for the maximum year which would be 2015 in your case.

HTH

Best,

S

Not applicable
Author

Thanks! Works exactly as required.

sunny_talwar

Awesome. I am glad I was able to help.

Have a good one.

Best,

S