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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Retrieve Single Value from Data Island for Expression Calculation

Hi! I have a data island containing two fields: Date and Exchange Rate. I need to retrieve the exchange rate for a specific date, which is entered by the user into an input field in my Qlikview file. I store this date value as a variable.

The goal is to translate the Amount on my normal Data table with the Exchange Rate of the selected Date.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

only({<Date = {'$(vSelectedDate)'} >} [Exchange Rate])

edit: I think it would be best to create another variable vRate

vRate = only({<Date = {'$(vSelectedDate)'} >} [Exchange Rate])

Then use this variable in your expressions, like

=sum(Amount* vRate)

View solution in original post

9 Replies
swuehl
MVP
MVP

Try

only({<Date = {'$(vSelectedDate)'} >} [Exchange Rate])

edit: I think it would be best to create another variable vRate

vRate = only({<Date = {'$(vSelectedDate)'} >} [Exchange Rate])

Then use this variable in your expressions, like

=sum(Amount* vRate)

er_mohit
Master II
Master II

Try this

sum({<Date = {"$(=vSelectedDate)"} >} [Exchange Rate])

Not applicable
Author

That worked - thanks a lot! I also realized one more mistake on my end - the variable date format and the date format of my data island was not the same. After I applied the same date format, things started to fall in place.

I will also adopt the suggestion of having a second variable for the Exchange Rate Value itself - will make things a lot easier.

Thanks again - also for the fast answer.

Not applicable
Author

That worked - thanks a lot! I also realized one more mistake on my end - the variable date format and the date format of my data island was not the same. After I applied the same date format, things started to fall in place.

I will also adopt the suggestion of having a second variable for the Exchange Rate Value itself - will make things a lot easier.

Thanks again - also for the fast answer.

Not applicable
Author

That worked - thanks a lot! I also realized one more mistake on my end - the variable date format and the date format of my data island was not the same. After I applied the same date format, things started to fall in place.

I will also adopt the suggestion of having a second variable for the Exchange Rate Value itself - will make things a lot easier.

Thanks again - also for the fast answer.

Not applicable
Author

This solution also worked - thanks a lot!

Not applicable
Author

This solution also worked - thanks a lot!

Not applicable
Author

That worked - thanks a lot! I also realized one more mistake on my end - the variable date format and the date format of my data island was not the same. After I applied the same date format, things started to fall in place.

I will also adopt the suggestion of having a second variable for the Exchange Rate Value itself - will make things a lot easier.

Thanks again - also for the fast answer.

Not applicable
Author

This solution also worked – thank you very much for your kind help!