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

unique values into another table

Hi everyone,

I'm new to qlikview and I'm struggling with a relatively easy problem.

I have the following chunk of my table.

RowNoXY
11112
21112
3228
4228
5228
6334
7228
8228
91112
101112
11552

I have to do 2 things here:

1- I would like extract from this table, the unique values and get the following table:

XY
1112
228
334
552

How can I do this? I tried to use distinct, but it is not giving me what I want

2- From the new table, I want to create a simple histogram. I guess I should use X as dimension and Y as expression right?

I think I still miss the idea of how qlikview treats dimensions and expressions, can someone guide me to a documentation where this is well explained. Thank you

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Straight table:

Dim1:X

Dim2:Y                    // you might or might not need this

Exp1: Count(X)

View solution in original post

11 Replies
stigchel
Partner - Master
Partner - Master

X as dimension Y as expression, yes

Dimensions and Measures

Also

The Only Function

tresesco
MVP
MVP

Try a chart (straight table for tabular presentation, Bar chart- for histogram) with below setting:

Dimension: X

Expression: Sum( Distinct Y)

qv_testing
Specialist II
Specialist II

Try this,

X as DImension,

Y as Expression

Aggr(Sum(Y), RowNo) 

neha_shirsath
Specialist
Specialist

Refer the attached file. hope this will help you.

Not applicable
Author

The first question, is how can I get from table one to table two? If I remove RowNo from the dimension, I dont get any data.

and why there is sum here? I don't want to sum anything.

neha_shirsath
Specialist
Specialist

Have you checked my attachment?

I've created that table.

tresesco
MVP
MVP

Have you tried using a table box ? Use only the dimensions X and Y. That should get you the first requirement done. For 2nd try using my suggestion above.

qv_testing
Specialist II
Specialist II

Table box only shows Unique records only,

If you take X and Y, that should be unique records.

XY
1112
228
334
552
effinty2112
Master
Master

Hi Abdullah,

If you want to create your table of distinct values in your data model then:

RawData:

LOAD X,

     Y

FROM

[https://community.qlik.com/thread/269310]

(html, codepage is 1252, embedded labels, table is @1);

NoConcatenate

DistinctData:

LOAD

Distinct X,Y Resident RawData;

DROP Table RawData;

For your bar chart dimension X and expression Y will be fine. If you don't specify an aggregation function QlikView assumes Only(Y) which returns Y if there is only one value for Y and is null if more than one. Since for each value of X there is a single value of Y no explicit aggregation is required.

Bar.jpg

Regards

Andrew