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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

set analysis operators

Hi,

I have requirement where i need to convert local currency to USD amount.

sum((Sales*ExgRate)/ZFFACT)---this expression will converts to USD sales Amount.

Now I want to divide this amount by current week,Previous week and QTD wise.

I have used below set expression to calculate Current week sales ,looks I have mistake in expression.

sum({<FW = {'$(vCurrentWeek)'}>} Sales* ExgRate)/ZFFACT

kindly let me know your inputs how we can achieve this,is there any other ways to do this logic??

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like:

=Num(sum({<FW = {'$(vCurrentWeek)'},[Fiscal Year] = ,Quarter = ,Month =>} fabs((Value)*ExgRate)/ZFFACT) /1000000,'$#,##0.00 M')                 // for current week

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Can you post a qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
qlikviewwizard
Master II
Master II

Can you attach the sample file with the data?

tresesco
MVP
MVP

May be like:

=Num(sum({<FW = {'$(vCurrentWeek)'},[Fiscal Year] = ,Quarter = ,Month =>} fabs((Value)*ExgRate)/ZFFACT) /1000000,'$#,##0.00 M')                 // for current week

settu_periasamy
Master III
Master III

if you want to convert, you need put the currency code also.

for Current week value

sum({<FW = {$(vCurrentWeek)}>} Value)* Only({<CurrencyCode={'USD'}>}ExgRate)

for previous

sum({<FW = {$(=(vCurrentWeek)-1)}>} Value)* Only({<CurrencyCode={'USD'}>}ExgRate)

qlikviewwizard
Master II
Master II

Hi,

Did you get the solution? Please let us know. Thank you.