Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need to count values from two separate fields

I have two fields called Fax Type In and Fax Type Out.  Here are my IF statements which load the appropriate data.

Load *,

If([Originator_Group] = 'TCMFPQ4', 'MFP',

   If([Originator_Group] LIKE 'MXBPOS*', 'Efax',

      If([Originator_Group] LIKE 'SC*', 'SAP',

         If([Originator_Group] = 'ExpRpt' OR 

            [Originator_Group] LIKE 'TCL*' OR

            [Originator_Group] LIKE 'NPO*' OR

            [Originator_Group] LIKE 'SES*' OR

            [Originator_Group] LIKE 'PC*' OR

            [Originator_Group] LIKE 'TCS*', 'FI',

            If(len(Originator_Group) < 1, 'External', 'Other'

            )))))as [Fax Type In]

;

Load *,

If([Recipient_Group] = 'MFPTEMPL', 'MFP',

   If([Recipient_Group] LIKE 'MXBPOS*', 'Efax',

      If([Recipient_Group] LIKE 'SC*', 'SAP',

         If([Recipient_Group] = 'ExpRpt' OR 

            [Recipient_Group] LIKE 'TCL*' OR

            [Recipient_Group] LIKE 'NPO*' OR

            [Recipient_Group] LIKE 'SES*' OR

            [Recipient_Group] LIKE 'PC*' OR

            [Recipient_Group] LIKE 'TCS*', 'FI',

            If(len(Recipient_Group) < 1, 'External','Other'

            )))))as [Fax Type Out]

Now, I want to be able to construct a Pie Chart which totals the values from Originator Group and Recipient Group for

MFP

Efax

FI

External

Other

17 Replies
Anonymous
Not applicable
Author

That worked!  Thank you!   But, Can i keep the Recipient_Group Load statement, so i can display the Fax Type Outbound?

Anonymous
Not applicable
Author

On second observation.. that did not work..  It only returned one Fax type..  I need two fax types per table entry..  An inbound fax type and an outbound fax type..  Then i need to add up all the fax types..

Anonymous
Not applicable
Author

TO put simply..  I need to add all the common values from these two columns in my table..

2018-08-23 10_39_10-Start.png

vishsaggi
Champion III
Champion III

Can you share qvw file with this data or a qvd file with this data to work on. You can mask thedata if you have any confidential information following these steps. This way it will save time at my end to try it out.

Preparing examples for Upload - Reduction and Data Scrambling

Anonymous
Not applicable
Author

There ya go.. Thanks!

vishsaggi
Champion III
Champion III

Sorry got stuck with some work. Will look into it tomorrow.

Anonymous
Not applicable
Author

Any further thoughts?

vishsaggi
Champion III
Champion III

Sorry for the delay. Try this. Add the remaining fields in your first Load statement and your daterange and date script.

Korfax:

LOAD

     Date,

     Date|Hour,

     Day,

     [Fax Type Inbound],

     [Fax Type Inbound]  AS Inbound,

     [Fax Type Outbound] AS Outbound,

     GroupedHour,

     Hour,

     HourTT,

     Originator,

     Originator_Group,

     Originator_Info,

     [Receiver Status],

     Year

FROM

[..\KofaxReporting.xlsx]

(ooxml, embedded labels, table is Document_TB02);

LOAD

     [Fax Type Outbound] AS [Fax Type Inbound],

     Count([Fax Type Outbound]) AS OutboundCnt

FROM

[..\KofaxReporting.xlsx]

(ooxml, embedded labels, table is Document_TB02)

Group By [Fax Type Outbound];

Capture.PNG