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

Month wise data in qlikview

Dear Experts ,

I am designing month wise account reports ,but i am getting same value for all months .

For Example assume i have an data from 201404 to 201508 . in my report i want to display data for four months from 201504 to 201507  .

If my month value is 201504 , then i want to sum of 201404 to 201504 .

if my month value is 201505 , then i want to sum of 201404 to 201505 .... but i am getting same value for all months . please suggest .

In my report for apr month value 201504 will be 95511.31 , but i am getting  -182474 for all four months .

3 Replies
PrashantSangle

Hi,

Check your variable definition.

I think TOTAL_REV_LOCAL_AMOUNT and TOTAL_REV_CORPORATE_AMOUNT

are fields not string so when define in variable mention it like

if(Curr='LOCAL',TOTAL_REV_LOCAL_AMOUNT,TOTAL_REV_CORPORATE_AMOUNT)

not

if(Curr='LOCAL','TOTAL_REV_LOCAL_AMOUNT','TOTAL_REV_CORPORATE_AMOUNT')     // Dont use single quote .

Might be this help you.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

HI Max Dreamer ,

Thanks for your reply

Its not working , i am getting null values if i remove single quote .

svenkita
Creator II
Creator II

hi sriram

kindly correct the environment variable

if you go to the script editor

and check .. you have currently used the following

SET DateFormat='DD-Mon-YYYY';

if you want the Month to be as JAN, Feb ... in the data use the following

SET DateFormat='DD-MMM-YYYY';

In your  "Test Data" pivot chart

expression of "201504"

New Formula

=if(Curr='LOCAL',

Sum({< TB_MONTH= {"<=$(=MonthEnd(MakeDate(2015,05,01)))"} >}TOTAL_REV_LOCAL_AMOUNT),

Sum({< TB_MONTH= {"<=$(=MonthEnd(MakeDate(2015,05,01)))"} >}TOTAL_REV_CORPORATE_AMOUNT)

)