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

Announcements
Qlik Named a 7-Time Gartner® Magic Quadrant™ Leader: See the 2026 Report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Want to show last 6 month data in graph on activation and last month data in another graph

Hi All,

I am new to QV and currently working on QV11. I have trending graph(Bar Chart) and Pie chart and want to display the Last 6 month data into Bar Chart on report activation and latest month data into Pie chart. Also once I clear my selection it should come back to default selection.

Could you please let me know if you guys have solution for this.

Greatlty Appreciate your help and response.

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi,

     Try like this,

     =No Dimension and used expression like this, If you have Date field , use like this

     =Sum({<Date = {'>=$(=MonthStart(Max(Date))) <= $(=MonthEnd(Max(Date)))'}>}Sales)    

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-1)) <= $(=MonthEnd(Max(Date),-1))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-2)) <= $(=MonthEnd(Max(Date),-2))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-3)) <= $(=MonthEnd(Max(Date),-3))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-4)) <= $(=MonthEnd(Max(Date),-4))'}>}Sales)    

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-5)) <= $(=MonthEnd(Max(Date),-5))'}>}Sales)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
Not applicable
Author

In Dimension I Used Month as dimension and I want Default selection should be last six month.

I am not able to upload my .qvw file.

MayilVahanan

Hi,

     Try like this,

     =No Dimension and used expression like this, If you have Date field , use like this

     =Sum({<Date = {'>=$(=MonthStart(Max(Date))) <= $(=MonthEnd(Max(Date)))'}>}Sales)    

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-1)) <= $(=MonthEnd(Max(Date),-1))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-2)) <= $(=MonthEnd(Max(Date),-2))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-3)) <= $(=MonthEnd(Max(Date),-3))'}>}Sales)

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-4)) <= $(=MonthEnd(Max(Date),-4))'}>}Sales)    

     =Sum({<Date = {'>=$(=MonthStart(Max(Date),-5)) <= $(=MonthEnd(Max(Date),-5))'}>}Sales)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.