Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stekol61
Creator
Creator

Show data for current week

Hi!

I have an app where i want to  show the number of Tickets for the current week no matter what other date filters that are used in the app.

E.g. the date filter could be set for the previous 3 months and the result is presented in a graph but I also want to present the value for the current week

 

35 Replies
bramkn
Partner - Specialist
Partner - Specialist

Use set analysis and exclude all the date fields.
something like {<date,day,year,week={thisweek}>}

stekol61
Creator
Creator
Author

But i want that all graphs should show data based on the dynamic filers. Only one specific text box should always show data for the current week.
Will the set analysis solve this?
Shubham_Deshmukh
Specialist
Specialist

YUP possible, try this :
=Sum({<filterToAvoid1=,filterToAvoid2=,filterToAvoid3=>}If(date>=WeekStart(today()) and date<=WeekEnd(today()),field))
Let me know this works for you or not.

bramkn
Partner - Specialist
Partner - Specialist

Set analysis will put standard filters on a measure. if you make sure to include the calander values without an actual value. This to exclude these selections. You will make it always show the current week. when you set it to it. There are a lot of tutorials on how it works. It might be usefull to read up on it as it might help you solve some of your other wishes.
bramkn
Partner - Specialist
Partner - Specialist


@Shubham_Deshmukh wrote:

YUP possible, try this :
=Sum({<filtersToBeAvoid1=,filtersToBeAvoid2=,filtersToBeAvoid3=>}If(date>=WeekStart(today()) and date<=WeekEnd(today()),field))
Let me know this works for you or not.


Dont use an if for this.

use this: Sum({<filtersToBeAvoid1=,filtersToBeAvoid2=,filtersToBeAvoid3=,date={">=$(=WeekStart(today())) <=$(=WeekEnd(today()))"}>}field))

There might be some brackets misplaced so make sure to check in qlik.

Shubham_Deshmukh
Specialist
Specialist

Hi @bramkn ,

Ya, agreed. 

=Sum({<filterToAvoid=,date ={">=$(=weekStart(today()))<=$(=weekEnd(today()))"}>} sale)

stekol61
Creator
Creator
Author

Hi!

Not sure about the syntax to use.

I have a filter 'Period' that can be either 'Week' or 'Month' (See below).

I tried to use '<filterToAvoid=,Period ' but it doesn't show the correct result

 

Period.PNGPeriod_2.PNGPeriod_3.PNG

Shubham_Deshmukh
Specialist
Specialist

Can you share your expression?
stekol61
Creator
Creator
Author

Hi!

Here it is:

=Count({<filterToAvoid=,Period ={">=$(=weekStart(today()))<=$(=weekEnd(today()))"}>} wor_ticket_ID)

It does not override the 'Period' selection

 

(I'm using Sense, don't know if that matters)