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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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