Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
infosense_devel
Contributor 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

Re: Line chart data issue.

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

Re: Line chart data issue.

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

Re: Line chart data issue.

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

infosense_devel
Contributor II

Re: Line chart data issue.

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

Re: Line chart data issue.

Can you add another expression and paste its output here:

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

infosense_devel
Contributor II

Re: Line chart data issue.

My Requirement is satisfied by this suggestion thanks a lot.