Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jacek27031
Contributor III
Contributor III

Adding calculated measure

Hi, 

I have 2 tables:

In the first one (SO Table) I have sales in units [# Sales Out Quantity]. The second table (Pricelist) is the price list in which I have recommended prices for each product ID [SRP]. Of course there is an association between both tables by %productID. 

How to add a measure that shows sales in value terms and calculate productID.[# Sales Out Quantity] * productID[SRP] ?

Thanks in advance for any help.

J. 

3 Replies
Or
MVP
MVP

You could either join these two tables into a single table by using JOIN / LEFT JOIN / CONCATENATE and then perform the calculation on the ensuing table, or you could create a mapping load to fetch the price into the SO Table and perform the calculation there, or you could just perform the calculation on the front end in a master measure or chart measure.

jacek27031
Contributor III
Contributor III
Author

Sth like this?

m: mapping LOAD "%Product ID", SRP
FROM [lib://PL_CONS_TRACKER (len_jwoz)/Pricelist.qvd];

ORDERPOSITION:
LOAD
"%Product ID",
"Product ID",
%Date,
"%Customer ID",
"Customer ID",
"# Sales Out Quantity",
(SRP)*ApplyMap('m', "# Sales Out Quantity", 0) as revenue
FROM [lib://bms3_emea_root_folder/qvd_facts/f_WESI_SO.qvd](qvd)

Or
MVP
MVP

I think you're using ApplyMap on the wrong side here... should be something like:

"# Sales Out Quantity"*ApplyMap('m', "%Product ID", 0) as revenue