Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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)
6 Replies
mfchmielowski
Creator II
Creator II

Hi.

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

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 

Ksrinivasan
Specialist
Specialist

hi,

you can create variable= vMaxweek=Max(Weekno)

then call in chart measure as

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

 

ksrinivasan

 

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.

Mch201
Contributor III
Contributor III
Author

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

Mch201
Contributor III
Contributor III
Author

Where exactly will this go?