Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data in Matrix

Hi,

I have a requirement to visualize the data coming from different systems and identify the difference between systems. At an overview level, I am trying to compare the count of records and sum of an amount column between multiple systems. Below is an example as how I would like to see:

  Data:

CountAmount
System 1150100000
System 212090000
System 313095000

This is how I would like to visualize the above data. Below is just based on count 

System 1System 2System 3
System 103020
System 230010
System 320100

Is there a way to achieve this?

Regards,

Dev

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like this:

//Creating some sample data

INPUT:

LOAD Chr(ORD('A')+floor(RAND()*3)) as System,

  Recno() as ID

Autogenerate 20;

LOAD System as _System

RESIDENT INPUT;

Then using System and _System as dimensions and as expression

=Count(ID)-Count(DISTINCT TOTAL<_System> If(System=_System,ID))

System _System ABC
A--3-2
B3-1
C2-1-

System count(ID)
20
A5
B8
C7

View solution in original post

8 Replies
sunny_talwar

None of the two tables provided above seems to be raw data. This might be possible by creating another field in the script like this:

LOAD System,

          System as _System

          ...

FROM Source;

and use them both in your pivot table.

For a more help, you would need to provide a sample data behind this output.

swuehl
MVP
MVP

Assuming you are loading same field names from different tables, you can create a new field to identify your systems:

LOAD 'System 1' as System,

           Field1,

          Amount,

          OtherFields

FROM YourSystem1Table;

CONCATENATE

LOAD 'System 2' as System,

           Field1,

          Amount,

          OtherFields

FROM YourSystem2Table;

CONCATENATE

LOAD 'System 3' as System,

           Field1,

          Amount,

          OtherFields

FROM YourSystem3Table;

Then create a straight table chart with dimension System and two expressions

=Count(System)

=Sum(Amount)

I am not quite sure what you want to tell us with your second table.

Anonymous
Not applicable
Author

Apologies if my requirement was not clear. First table is the data that shows the count of records per system and the second table is the output that I expect to see in adjacency matrix format:

   

System 1System 2System 3
System 10System 1.Count - System 2.countSystem 1.count - System 3.count
System 2System 1.Count - System 2.count0System 3.Count - System 2.count
System 3System 1.count - System 3.countSystem 3.Count - System 2.count0
Anonymous
Not applicable
Author

Thank you Sunny for your response. First table is the raw data and second table is the output I expect to see. Let me know if you need more info to assist.

sunny_talwar

I am still not sure I understand how am I going to create the required output from given input. How is 150 count for System 1 gets divided between System 2 and System 3?

Anonymous
Not applicable
Author

Basically, I am doing this to reconciliate the data across systems. Data get transferred from System 1 to System 2 and from System 2 to System 3 and so on. In the process of transferring data from one system to another, it is expected to have the complete data transferred to the destination system without any reduction. So if there is any drop of record count from one system to another, then it has to be shown in the qlikview dashboard. I need to see variance in terms of count of records between systems.

swuehl
MVP
MVP

Maybe something like this:

//Creating some sample data

INPUT:

LOAD Chr(ORD('A')+floor(RAND()*3)) as System,

  Recno() as ID

Autogenerate 20;

LOAD System as _System

RESIDENT INPUT;

Then using System and _System as dimensions and as expression

=Count(ID)-Count(DISTINCT TOTAL<_System> If(System=_System,ID))

System _System ABC
A--3-2
B3-1
C2-1-

System count(ID)
20
A5
B8
C7
Anonymous
Not applicable
Author

Thank you. This worked perfectly. I made some changes to what I need to show.