Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Ron
Contributor II
Contributor II

Creating a new Measures

Hi,

I'm new at Qlik Sense and I want to know how to create new combination of measure baaed on  two different Tables.

Let's say I have the following two tables:

Sales with the fields: [field_1],[field_2],....., [Product_ID], {Quantity],

 And tbl :

Products with the fields:[Product_ID],[field_2],...….,[SalesPrice]

 

I want to present an Math expression SalesPrice * Quantity

How should I do.

Thanks for the help!

1 Solution

Accepted Solutions
Vegar
MVP
MVP

@Channa  is right, it is possible to make calculations over different tables, but it is possible to get it wrong.

Consider the top two-data tables and the  two bottom straight table charts using these two tables. The only difference is which dimensions are present.

image.png

 

Quantity * Salesprice is the same as Only(Quantity) * Only (Salesprice)

View solution in original post

5 Replies
Channa
Specialist III
Specialist III

qlik make joins automatic based on common column names

you just need to create new measure

just write expression: Quantity*Price 

Channa
Vegar
MVP
MVP

@Channa  is right, it is possible to make calculations over different tables, but it is possible to get it wrong.

Consider the top two-data tables and the  two bottom straight table charts using these two tables. The only difference is which dimensions are present.

image.png

 

Quantity * Salesprice is the same as Only(Quantity) * Only (Salesprice)

Channa
Specialist III
Specialist III

i am not sure what he is looking for but  i just put basic idea ,it is based on how we design data model

 

i see your  bottom tables getting right results

i really dont get why you need to use ONLY() hear

 

Channa
Ron
Contributor II
Contributor II
Author


@Channa wrote:

i am not sure what he is looking for but  i just put basic idea ,it is based on how we design data model

 

i see your  bottom tables getting right results

i really dont get why you need to use ONLY() hear

 


Thank you so much for the help,

So to be sure, if I want to create new sheet based on my new measure (Quantity*salePrice) with ProductID's field as dimensions , is it possible (I understand the dimensions  can't be an measure )?

Vegar
MVP
MVP

As long you are calculating on the lowest dimensionality you will be safe. It is also possible to calculate on a higher level as well, but then you will need to do some kind of aggregations.

@Channa I was just pointing out that when you type =Salesprice in a measure it will be intepreted as if you wrote =only(Salesprice). So if you have a table with high level dimensions with multiple Salesprice per row your expression =only(Salesprice) will return NULL().