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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying only last three period's trend in a minichart


Hi,

Can anyone let me know how i can restict the period display to last three perid(Q7,Q6,Q5) in the minichart of my application.

PFA

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Change the expression to Sum({<Qtr={'Q7','Q6','Q5'}>}Amt).

If you want to be able to make a selection in the Qtr field and show the last three quarters of that selection then you'll have to create a numeric quarters field. You can then use something like Sum({<QtrNo={'>=$(=max(QtrNo)-2)'}>}Amt).


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

If you always want to display these specific quarters then you can hard code them in your set analysis:

sum(${<Qtr = {'Q5', 'Q6', 'Q7'}>} amt)

If you want to display the last three quarters based on your selections, you can assign a number field for the quarters, QtrNum, where it would be 1 when Qtr is Q1, etc...

Your minichart expression would look like this:

sum ({$<QtrNum = {">=$(=Max(QtrNum)-2) <=$(=Max(QtrNum))"}>} Amt)

Hope this helps you.

Not applicable
Author

Incase I have to display the last six months (text field)in the trend how can I achieve it

Thanks & Regards,

Anushree Shetty

jagan
Partner - Champion III
Partner - Champion III

Hi,

If you have a datefield in your datamodel then use below expression

=Sum({<DateFieldName={'>=$(=MonthStart(max(DateFieldName)-5))<=$(=Max(DateFieldName))'}>}Amt)

If above expression not works then check the formats of DateFieldName and Today() are same.

Hope this helps you.

Regards,

Jagan.