8 Replies Latest reply: Jul 28, 2015 4:19 AM by Philipp Schöck

Dimension Vs Expression

Hi all,

I work for a few months with qv, but I noticed that I know the difference between a dimension and an expression not quite clear.

Is it like a math-functions?

Each x-value is assigned to exactly one y-value but each y-value can be assigned to any number of x-values?

So x would be the dimension and y would be the expression?

It would be really nice if somebody could help me with this.

I really want to understand and I really want to have a strong basic knowledge.

Many Thanks

• Re: Dimension Vs Expression

Not exactly like a maths function.

Simply put:

Expressions are the measures or metrics, such as cost, profit, wait-time, etc that you are reporting on or interrogating.

Dimensions are the attributes you will use to filter and display the measures, such as customer, salesperson, region, product code.

• Re: Dimension Vs Expression

Ok, but what happens if I have something like a table with BusinessUnits and OrderNumbers...

so I think BusinessUnit could be my Dimension, because I want to know which OrderNumbers belong to my BusinessUnits, so I can filter for BusinessUnits.

But now, I have several OrderNumbers for just one BusinessUnit... in this case QV dont show me any value.

Do u know what I did wrong?!

• Re: Dimension Vs Expression

Hi,

well, you can do different things in QlikView, of course.

But in that specific instance - when you have several values that should be displayed on the same dimension_point, QlikView doesn't display them in charts - only in listboxes - so you need to have a second dimension that makes this unique, so you have only one OrderNumber per dimension_point - the easiest unique dimension is a rowNo(). You can just set that field to not be displayed.

• Re: Dimension Vs Expression

Ok, I understand. Is this also valid if I use a Pivot Table?!

• Re: Dimension Vs Expression

I have little experience with Pivot_tables, but I guess it would. It is a general thing in QlikView that for every dimensional point in a chart, QlikView needs to have exactly one value (or sum or whatever) to display.

• Re: Dimension Vs Expression

So I tried to use RowNo(), at created an Row ID to make the entries unique... but i do not work again

I used Row ID and BusinessUnit as Dimension and OrderNumber as Expression.

Thats the results:

Ideas?!

• Re: Dimension Vs Expression

Ok, I found something... I just used both as dimension...expression is not always needed

• Re: Dimension Vs Expression

Hi Philipp,

yes, dimensions and expressions are just like you learned in math. You have a dimension along the x-axis (horizontally) and an expression on the y-axis (vertical) - usually. There is an option to turn that around in QlikView so that you can make a barchart (which normally has vertical bars) go horizontally. That way, you can have a chart that has horizontal bars going to the right and to the left off a line in the middle of the screen.

The usual case, though, is the regular understanding of dimension vs expression.

For ex., you want to chart "sales volume per sales_person" - so the sales_persons (their names or IDs) will be your dimension and your expression will be sth like the sum of their respective sales figures.

HTH