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

This widget could not be displayed.

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Mch201
Contributor III
Contributor III

How to show data for only the most recent week?

I have a bar chart with data that is updated every week. how can i make it that it only shows data for the most recent week without using filter every time?

Labels (3)
This widget could not be displayed.
6 Replies
mfchmielowski
Creator II
Creator II

Hi.

You can use SetAnalisys expresion fe. sum({< yourDateCol={">=$(=WeekStart(today(1)))"} >} productQuantity)

This widget could not be displayed.
Mch201
Contributor III
Contributor III
Author

qlikpic.png

 

 

Hey, thanks for the response. can you tell me why this is giving me an "invalid dimension" error? Week is the column which has the week number in it.

 

**hid the dimension for privacy reasons 

This widget could not be displayed.
Ksrinivasan
Specialist
Specialist

hi,

you can create variable= vMaxweek=Max(Weekno)

then call in chart measure as

Sum({$<Weekno= {'$(=vMaxweek)'}>}sales)

 

ksrinivasan

 

This widget could not be displayed.
mfchmielowski
Creator II
Creator II

Hi.

WeekStart(today(1)) returns Date not numer of week. Check this: sum({ < Week={">=$(=Week(today(1)))" >} columnName)

The Ksrinivasans looks also correct.

This widget could not be displayed.
Mch201
Contributor III
Contributor III
Author

This expression will go under my measure, correct? & "sales" is a measure in your example ??

This widget could not be displayed.
Mch201
Contributor III
Contributor III
Author

Where exactly will this go?

This widget could not be displayed.