Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Count with different columns

Hi Community,

below is my table (after transformation my data looks like below)

LOAD * INLINE [
ID, AREA, Status_1, Status_V1, Status_2, Status_V2
100, Qlik Sense, Qlik Sense, 80, QlikView, 20
101, QlikView, QlikView, 100, ,
102, QlikView, QlikView, 100, ,
103, QlikView, QlikView, 100, ,
104, QlikView, QlikView, 100, ,
105, QlikView, QlikView, 100, ,
106, QlikView, QlikView, 100, ,
107, QlikView, QlikView, 100, ,
];

paulwalker_2-1685013058615.png

My count should be club with Status_1 and Status_2

QlikView Count should be 8 (which I have highlighted) and Qlik Sense should be 1

and same way sum QlikView=720 and Qlik Sense=80

Please note should not be hard code in set expression, I have many values  not only QlikView and Qlik Sense.

 

@tresesco@MayilVahanan,  @Kushal_Chawda@marcus_sommer@stevedark 

and Experts - Can you please take a look!

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

I would merge the status and the value fields into a single field each, for example like:

t: load ID, Area, Status1 as Status, V1 as V, 1 as Source from Source; concatenate(t)
    load ID, Area, Status2 as Status, V2 as V, 2 as Source from Source;

If there are more status-fields it might be more practically to load this logic with one or two crosstable loads.

View solution in original post

1 Reply
marcus_sommer

I would merge the status and the value fields into a single field each, for example like:

t: load ID, Area, Status1 as Status, V1 as V, 1 as Source from Source; concatenate(t)
    load ID, Area, Status2 as Status, V2 as V, 2 as Source from Source;

If there are more status-fields it might be more practically to load this logic with one or two crosstable loads.