Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
qvhjenvo
Contributor
Contributor

Filter of Range for weekname

Hi,

I want to make a plot for course of Dollars vs Norwegian for last year based on week or weekname.

=avg({$<to_currency = {'USD'}, currency_weekname = {"(='>=' & WeekName(Addyears(max(date(Date#(currency_date, 'YYYYMMDD'))),-1)) & '<=' & WeekName(Addyears(max(date(Date#(currency_date, 'YYYYMMDD'))),0)) )"}>}(1/currency_exchange_factor) * currency_unit)

Somebody give me hints why this expression does not work.

Thanks in advandce

Regards

Loi

3 Replies
Digvijay_Singh

Don't have access to qvw, can you share what output you are getting, also you can use expression as label of Straight table column to see where it is getting wrong to refine further.

qvhjenvo
Contributor
Contributor
Author

Wear that u do not have access to qvw. I seems that my filter

currency_weekname = {"(='>=' & WeekName(Addyears(max(date(Date#(currency_date, 'YYYYMMDD'))),-1)) & '<=' & WeekName(Addyears(max(date(Date#(currency_date, 'YYYYMMDD'))),0)) )"}

does not work.

I am trying to attche qvw agian. But I how to do it.

Loi

tamilarasu
Champion
Champion

Hi Loi,

Try this expression,

=avg({$<to_currency = {'USD'}, currency_weekname = {$(=concat(distinct chr(39) & currency_weekname & chr(39), ','))}>}(1/currency_exchange_factor) * currency_unit)