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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MK_QSL
MVP
MVP

Variable and Set Analysis

Hi Community,

I have created below two variables. Margin% is being calculated using the same. To be noted that these data belongs two last 5 years.

eLineSalePriceEURO

if([Customer Invoice Currency]='UKL',[Invoice Price]*[Exchange Rate]*[Invoice Quantity],[Invoice Price]*[Invoice Quantity])

eLineCostPriceEURO

[Cost Price in UKL]*[Exchange Rate]*[Invoice Quantity]

=NUM((SUM($(eLineSalePriceEURO))-SUM($(eLineCostPriceEURO)))/(SUM($(eLineSalePriceEURO))),'#,##0.00%')

1)      How can I create a third variable eMargin for Margin% so that I can use it directly without writing above formula?

Currently I am using below two show year wise margin.

=NUM((SUM({1<Year = {'2010'}>}$(eLineSalePriceEURO))- SUM({1<Year = {'2010'}>}$(eLineCostPriceEURO)))/
(SUM({1<Year = {'2010'}>}
$(eLineSalePriceEURO))),'#,##0.00%')

2) How can I show year wise margin using set analysis and eMargin variable

0 Replies