Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
infosense_devel
Creator II
Creator II

Line chart data issue.

Hello,

          i have requirement to show country wise data in line chart, but the twist is i have 10 countries data and i have to show it like below.

line_chart.png

Desire result:-

VUSA=> America, VCAN=> Canada and VIL=> Total (Total should have all countries data including VUSA and VCAN).


Currently i am getting wrong data because in dimension i have used below expr:

=if(NAME='VCAN_OU' or NAME='VUSA_OU',NAME,'VIL')

So currently i am getting VIL as other than VUSA and VCAN.



in amount i have used below expression:

=sum({<REC_TYPE={BacklogRecHistory},Accounts=,BACKLOG_SBU-={MS},Common_Month=,BACKLOG_WEEK_FLAG={1},[Common_Day (#)]=>}(BACKLOG_AMT + PAST_DUE_AMT))

Please suggest me some other way to achieve my desire result.

Thanks in advance.





1 Solution

Accepted Solutions
sunny_talwar

Alternatively, just use 1 dimension and three expressions

1)

Sum({<NAME= {'VCAN_OU'}, REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))

2)

Sum({<NAME= {'VUSA_OU'}, REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))


3)

Sum({<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))

View solution in original post

5 Replies
sunny_talwar

You can try like this:

=If(NAME='VCAN_OU' or NAME='VUSA_OU',


Sum({<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT)),


Sum(TOTAL <DateField> {<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT)))

Assuming that your first field is DateField. Replace it with whatever you call it in your database

sunny_talwar

Alternatively, just use 1 dimension and three expressions

1)

Sum({<NAME= {'VCAN_OU'}, REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))

2)

Sum({<NAME= {'VUSA_OU'}, REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))


3)

Sum({<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT))

infosense_devel
Creator II
Creator II
Author

Really appreciate your reply.

as per your suggestion i have put below expr:

=If(NAME='VCAN_OU' or NAME='VUSA_OU',

Sum({<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT)),

Sum(TOTAL <Common_Date> {<REC_TYPE={BacklogRecHistory}, Accounts=,BACKLOG_SBU-={MS}, Common_Month=, BACKLOG_WEEK_FLAG={1}, [Common_Day (#)]=>} (BACKLOG_AMT + PAST_DUE_AMT)))

but with this expression i am getting TOtal for VUSA and VCAN column also.Please take a look at below screenshot.

line_chart_1.png

sunny_talwar

Can you add another expression and paste its output here:

=If(NAME='VCAN_OU' or NAME='VUSA_OU', 1, 2)

infosense_devel
Creator II
Creator II
Author

My Requirement is satisfied by this suggestion thanks a lot.