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: 
Not applicable

Pivot Table and Set Analysis?

Hi everyone,

I am trying to create a report that counts in a certain way, and not sure how to go about doing that. I might have used a wrong title here, but here goes...

Suppose I have the dataset below, and I would like to create a report that calculates total values as well as counts the number of IDs whose value_1 is greater than value_2.

I am having trouble counting the number of IDs. My desired result/report is also shown below. Thank you.

DATASET:

YYYYMM              ID     Value 01      Value 02
2013031129
20130329288
20130335840
20130349150
20130414047
20130426446
20130435196

Desired Result/Report:

Total Value 1397
Total Value 2396
Total # of IDs4
# of IDs: Value 1 > Value 22
# of IDs: Value 1 <= Value 22
1 Solution

Accepted Solutions
Kushal_Chawda

Hi,

Got your point..

see the attached one

View solution in original post

12 Replies
Kushal_Chawda

See the attched application

Not applicable
Author

Hi Kush,

thank you for the app, but I don't think it does what I need yet. The number of IDs should be tied to to the (total) time period selected.

In this example, when ID = 3 is selected, Total Value 1 = 109 and Value 2 = 136, and so the report should display

  • (# of IDs: Value 1 >    Value 2) = 0
  • (# of IDs: Value 1 <=  Value 2) = 1

Could you assist?

Kushal_Chawda

Hi ,

see the attched one

f I am not wrong ...# of IDs: Value 1 > Value 2 =1 not 0

Not applicable
Author

I am not saying that you are wrong, I am saying that the app is not displaying what I need:

When ID = 3 is selected, I am seeing

  • Total Value 1 = 109
  • Total Value 2 = 136
  • Total # of IDS = 1

which is fine.

However, I need to display

  • # of IDs: Value 1 > Value 2 = 0
  • # of IDs: Value 1 < Value 2 = 1

I get this result when I select 201303 and 201304 and ID = 3. Value 1 are 58 and 51, while Value 2 are 40 and 96. And when we sum up the values and compare total value 1 and total value 2, we get 109 vs 136 which yields my desired result.

Kushal_Chawda

Hi,

Got your point..

see the attached one

Not applicable
Author

Thank you for the app, but it still doesn't provide what I need.

I need to count distinct IDs over entired period selected. In app, when I remove YearMonth dimension and select ID = 3, it displays below

  • ID For Value01 > ID For Value02 = 1
  • ID For Value01 < ID For Value02 = 1

However, I would like to display

  • ID For Value01 > ID For Value02 = 0
  • ID For Value01 < ID For Value02 = 1

because Total Value 01 and Total Value 02 for ID=3 is 109 and 136 respectively.

Not applicable
Author

Great, thank you.

If you don't mind, could I take one step further? Similar to my original question,

DATASET:

Dim_01YYYYMMIDMeasure_01Measure_02
AA2013031129
AA20130329288
AA20130517637
AA2013052273
AA2013071101
AA2013072987
BB20130335840
BB20130349150
BB20130532510
BB20130544583
BB20130731043
BB2013074745
CC20130414047
CC20130426446
CC2013061399
CC20130626211
CC20130812613
CC2013082766
DD20130435196
DD2013063198
EE2013044420
EE2013064169

DESIRED RESULT:

Dim_01Value 1Value 2# of IDs# of IDs: Value 1 > Value 2# of IDs: Value 1 <= Value 2
AA279235220
BB303231211
CC307132220
DD52194101
EE589101
Kushal_Chawda

see the attched one

Not applicable
Author

This is great, thank you. Really appreciate the time you took to help me out here.