Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

antonybi
Contributor

Max Bucket

Hi Folks,

I've one list box called Yardstick and it contains R3M, R12M,QTR and  YTD(PFB for your reference)

Capture1.PNG

My requirement is in text object, only Maximum bucket should display If I select QTR.

So here my desired output should be Apr'18-June'18. I've tried with below expression but no luck.

Aggr(Max(RollingPeriodString),Yardstick)

would someone can suggest how do I achieve this requirement.

Appreciate your effort.

Thanks

Tags (1)
5 Replies
MVP & Luminary
MVP & Luminary

Re: Max Bucket

The max value doesn't work on string values. Perhaps you can turn your RollingPeriodString values into values with both a numeric value and a string display format value using the Dual() function.


talk is cheap, supply exceeds demand
qlikmeplease
Contributor III

Re: Max Bucket

Do you not have the actual date field ? Use that instead.  I am assuming you created the string field afterwards.

Date fields are duel, meaning numerical functions such as Max can be used.

antonybi
Contributor

Re: Max Bucket

Hi Gysbert,

Thanks for the response.

Would you be able to elaborate this in detail.

I've tried with dual but didn't work.

Please suggest if have any other alternatives.

MVP & Luminary
MVP & Luminary

Re: Max Bucket

See these blog posts:

Data Types in QlikView

Dual & Exists – Useful Functions

If that doesn't help you solve your problem the please post a small qlikview document that illustrates the problem.


talk is cheap, supply exceeds demand
antonybi
Contributor

Re: Max Bucket

Thanks Gysbert for the response.

I've tested with Yardstick-QTR

Yes Almost reached in filter and In text object I have taken Max(RollingPeriodString1) and its displaying 3.

But here my desired output should be Apr'18-Jun'18.

Please find the below sample script along with dual and correct me if I'm anything wrong.

Before:

Before.png

After changes with dual:

After.png

Look forward your quick response.