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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Margin Calculation

Hi Guys,

i created a report with the following expression.

I would like to add an expression and use the [COGS YTD $(vYear)] directly in the expression, is something possibile?

which is the syntax?

Imagine another expression called MARGIN where the expression is = [COGS YTD $(vYear)] / [Revenue YTD]


Cattura.PNG

5 Replies
Anil_Babu_Samineni

Yes, This label of expression we can use like Measure with in the expression. Will you provide more info related same

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable

='COGS YTD $(vYear)'

qlikviewaf
Creator
Creator
Author

Not working.. lookCattura213.PNG

Not applicable

Works for me.  Can you show me the definition of your year variable?

21-07-2017 16-16-20.jpg

Anonymous
Not applicable

When I did this calculation I put the 2 amounts/calculations (vCOGS and vREVENUE) into variables then directly input the expression into the Margin% column [ =(vCOGS - vREVENUE) / vREVENUE ]