Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gautik92
Specialist III
Specialist III

Month Char

I have a bar chart with two expressions showing values for max month and max(Month)-variable

in legend i want to show the name of the month

how can i achieve this?

Now its show no of month

1 Solution

Accepted Solutions
gardenierbi
Creator II
Creator II

Works the same! See attachment!

View solution in original post

16 Replies
robert_mika
Master III
Master III

Did you try:

Presentation-Show Legend

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Gowtham,

Can u share some sample data...?

gautik92
Specialist III
Specialist III
Author

not that.

I have legend lik this

but i want lik Dec for 12 and jun for 6

Digvijay_Singh

You can use calculated dim something like dual(monthname(Date),Month). Not sure though if that is needed.

gautik92
Specialist III
Specialist III
Author

am telling about expression legend

Gysbert_Wassenaar

The easiest way is to create a small inline table in the script first that creates the Month values as dual values that have both a text representation for display and the 'real' number value of the month:

LOAD dual(MonthName, MonthNumber) as Month INLINE [

January,1

February, 2

...etc

December, 12

];


talk is cheap, supply exceeds demand
simenkg
Specialist
Specialist

Perhaps something like:

Monthname(max(Date)) and monthname(Addmonths(max(Date),-variable))

gautik92
Specialist III
Specialist III
Author

PFA

stephenedberkg
Creator III
Creator III

dear  gautik92

Try this

Current Month

upper(Date(Max({$<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))},Quarter=,Month=>}URDATE_Field),'MMM-YY'))

Last Month

upper(Date(Max({$<Year={$(=Max(Year))},MonthID={$(=Max(MonthID)-1)},Quarter=,Month=>}URDATE_Field),'MMM-YY'))

-1 instead of use your variable