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

Creating an expression

Hai

I am new to QV. I am creating expressions for a table. I have a question which many of you can easily answer.

If I want to directly show a field in an expression, I write [FIELD]. Is this correct?

If I want to show this expression, say, FIELD1/FIELD2 * 100. How do I show this?

Is it [FIELD1}/[FIELD2]*100 or SUM[FIELD1] / SUM([FIELD2]) * 100

What is the difference b/w (FIELD1) and [ FIELD1]?

Thanks

1 Reply
john_duffy
Partner - Creator III
Partner - Creator III

Hello.

The square parenthesis ([ and ]) are only required if you have a space in your field name. Therefore FIELD and [FIELD] are the same. If your field name was Sales Amt, you would use [Sales Amt].

I have attached a small application to help answer your expression questions.

If you create a chart and your expression can be resolved based on your dimensions, you do not require a chart aggregation function such as SUM. In the attached application, the chart Sales shows this. There is only one result for the dimensions, therefore QlikView can provide a value without an aggregation function.

The second chart, Sales2, gives an example of QlikView not being able to resolve an expression. Since my only dimension is Empl and Empl 'Bart' has more than one record in the table, QlikView cannot resolve the expression. In this case, dashes are displayed.

The third chart, Sales3, shows the use of an aggregation function. This chart has the same dimension as Sales2 (Empl). However, this time we sum our expressions. Therefore, the calculations are performed over all occurrences of the dimension Empl.

Use the Raw Data straight table to help determine how the calculations work.

Let me know if this helps.

John.