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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
SJ_16
Contributor II
Contributor II

% - Stop them adding together

Hi,

I have the following logic below with the 'Country' Filter.

When I select the country for AUS and SA the percentages work as expected, however when I look at the consolidated view, the percentages sum up rather than working out the exchange rate within the 'vFX_Sel'

Any idea how to resolve this please?


Sum({<[SFL Name]= {"New Rate"},

Year={$(=YEAR(TODAY()))}>} [Top Value]/$(vFX_Sel))

5 Replies
afroz_shaik
Contributor III
Contributor III

Hey steve,

Can you provide some sample data?

SJ_16
Contributor II
Contributor II
Author

I only have limited data as a one month snap shot I am reviewing but essentially if I have for AUS 75% and SA 65% my consolidated view is 125%. Probably doesn't help you I'm afraid.

This is the logic in the  FX Variable:    IF([Country]='AUS',Closing_AUS_FX_RATE,1)

afroz_shaik
Contributor III
Contributor III

Can you try this expression

Sum({<[SFL Name]= {"New Rate"},

Year={$(=YEAR(TODAY()))}>} [Top Value])/($(vFX_Sel))

SJ_16
Contributor II
Contributor II
Author

Thanks, but that still gives me the same results. I have tried so many variations but I just can't get it to work.

vamsee
Specialist
Specialist

Hi Steve,

I would suggest you create a new column with the exchange rate on the backend instead of using a variable.

Like

[Top Value] *   IF([Country]='AUS',Closing_AUS_FX_RATE,1) as Fx_Top_Value.


Coming to your expression

Try

For variable $(vFX_Sel) =IF(GetFieldSelections([Country])='AU',Closing_AUS_FX_RATE,1)


Sum({<[SFL Name]= {'New Rate'}, Year={"$(=YEAR(TODAY()))"}>} [Top Value] / $(vFX_Sel))