Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to consider only Maximum month data in all years in bar chart , here Year as Dimension

Hello All,

I have taken Dimension as Year and Expression as Sum(sales). Here i have to consider Maximum month data in all years in bar chart like attached image.

Ex: 2015 => December data

     2016 ==> December Data 

     2017 ==> July Data   only

1 Solution

Accepted Solutions
passionate
Specialist
Specialist

Hi Tulasiram,

Create a master calendar with (Year, Month, MonthNo, etc)

MonthNo is month number i.e 6: Jun; 7: Jul

Dimension:

Year

Use below set Analysis in expression:

=Sum({<Year,MonthNo={'$(=Max(MonthNo))'},Quarter,week,Date>}Sales)

Regards,

Pankaj

View solution in original post

4 Replies
el_aprendiz111
Specialist
Specialist

Hi,

1 exam

Aggr(IF(Rank(SUM(sales))= 1, SUM(sales)),year,month)

MarcoWedel

Hi,

one solution could be also:

QlikCommunity_Thread_267556_Pic1.JPG

QlikCommunity_Thread_267556_Pic2.JPG

Max(Aggr(Sum(Sales),MonthYear))

table1:

LOAD *,

    Year(MonthYear) as Year;

LOAD RecNo() as ID,

    MonthName(MakeDate(2015),Floor(Rand()*36)) as MonthYear,

    Ceil(Rand()*100) as Sales

AutoGenerate 100;

hope this helps

regards

Marco

effinty2112
Master
Master

Hello,

Maybe:

Max(Aggr(Sum(Sales),Month,Year))

Cheers

Andrew

passionate
Specialist
Specialist

Hi Tulasiram,

Create a master calendar with (Year, Month, MonthNo, etc)

MonthNo is month number i.e 6: Jun; 7: Jul

Dimension:

Year

Use below set Analysis in expression:

=Sum({<Year,MonthNo={'$(=Max(MonthNo))'},Quarter,week,Date>}Sales)

Regards,

Pankaj