Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
asimkhan10
Contributor
Contributor

How to display data for last 4months in graph with aggregation function

Hi ,

I am trying to use aggregation function to display last 4months of data on graph at frontend. But as soon as i click on a particular month only the data of that month is displayed but i need to view the data of the current month which i selected with the data of last 2-3 months on graph. Could you please help?

 

Below is the expression :

Red Line:

(sum({<Month4=>}aggr(sum(DISTINCT{<[Role Rank 10]={1,2,3},NEW_FEEDBACK1={'Poor'}, Month2 = {">=$(=Date(MonthStart(Max(Month2),-3),'MMM-YY'))<=$(=Date(MonthStart(Max(Month2)),'MMM-YY'))"}, Month4 = >} [Role Rank 101]),[Profile Key],[Role Rank 10]))/
(count(DISTINCT{<ProKey=,NEW_FEEDBACK1=, Month2 = {">=$(=Date(MonthStart(Max(Month2),-3),'MMM-YY'))<=$(=Date(MonthStart(Max(Month2)),'MMM-YY'))"}, Month4 =>} ProKey)*3))

 

Green Line:

(sum({<Month4=>}aggr(sum(DISTINCT{<[Role Rank 10]={1,2,3},NEW_FEEDBACK1={'Good'}, Month2 = {">=$(=Date(MonthStart(Max(Month2),-3),'MMM-YY'))<=$(=Date(MonthStart(Max(Month2)),'MMM-YY'))"}, Month4 = >} [Role Rank 101]),[Profile Key],[Role Rank 10]))/
(count(DISTINCT{<ProKey=,NEW_FEEDBACK1=, Month2 = {">=$(=Date(MonthStart(Max(Month2),-3),'MMM-YY'))<=$(=Date(MonthStart(Max(Month2)),'MMM-YY'))"}, Month4 =>} ProKey)*3))

 

 

 

 

Labels (1)
0 Replies