Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem while using MonthName in the expression for calculation

Hi All,

I want the sales growth this month when compared to last month in gauge chart. Wants to the display the current month name in words instead of numbers in the chart.

What in need to show the month name in years. As i can't calculate the current month and previous name in the expression MonthName-1 as the values are in words. It can to be calculate using Month-1 and that name should be displayed in words. Please help me out!

Have attached my sample application with this.

24 Replies
Not applicable
Author

Hi Mahasweta,

Thanks for your reply. My doubt was if i make any selection in the same MonthName for some month it works and for some it doesn't work. Where us if i select anything in the Month for all the selection it works.

I did not wrote expression or macro myself and i don't even knows how it works. All were written by Rahul. I need to go through the guide to improve my skills in expression and macros.

Requesting you to check and help me out if you can.

Not applicable
Author

Hi ,

i have try to solve your problem by calculating month number for the several years

please go through posted file ..

Hope this will clear you and will be more helpful to solve your problem..

As your set analysis expression is depend on month_no

thats why for evaluating the expression this field should be selected ,

i tried to select that month no by using simple select possible method

when we are selecting the month from list box on that selection i selected the corresponding Month no and then clear the Monthname,

so that for evaluating the expression month number is selected

For to understand the macro i will post a simple document created by me later

Hope this post will help you .....................

Not applicable
Author

Hi Rahul!

Thanks a ton for your help. Will check how it works and will let you know if there is any doubt.

If possible reply for below post also.

http://community.qlik.com/forums/t/23218.aspx

Not applicable
Author

Hi Rahul!

Please clear my doubt. I am still waiting for your reply!

Not applicable
Author

Hi Rahul!

I got struck up with some other work these days. So i didn't checked the solution given by you. Though it works i don't know what changes has to be done in my current data model. I will be very thankful to you if you can do the needed changes in the document attached by you. I mean to say that without commenting my script you do the needed changes in my document. As i am struggling to add the script written by you in my script. So without commenting my script please add your script and send it to me.

I have created all the required variable same like what you have created but couldn't succeed. Hope you will help me out!


sales1:
LOAD Year,
(((Year-$(Var))*12) + Month ) as Month_No,
subfield('$(MonthNames)', ';' , Month) as Month_In_Word,
Load Year as Year_Sel,
Month_In_Word as Month_In_Word_Sel
resident sales1;


Regards,

Rikab