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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramina
Contributor II
Contributor II

Date Button does not overwrite Date in the set analysis

Hello, 

 

I ' m looking for help with a following problem:

I have a button which shows next 6 months. The formula behind the action is: 

=Concat(distinct{$<Date={">=$(=monthstart(today(),1))"}>*$<Date={"<$(=monthstart(today(),7))"}>} Date, ';')

 

Then I have a formula of a Measure: 

sum({<Date={">=$(=monthstart(today(),1))"}>}[Demand [hour]]])

 

The button does not overwerite date selection in the formula, it ignores it completely.

 

Cheers

Ramina

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

If you have a set expression in your measure that defines a new set of dates, this should have precedence over the selection.

Try
{<Date*={">=$(=monthstart(today(),1))"}>}
instead of 
{<Date={">=$(=monthstart(today(),1))"}>}

Then you will get the intersection between the two. See more on https://community.qlik.com/t5/Design/Implicit-Set-Operators/ba-p/1475624

HIC

 

View solution in original post

2 Replies
hic
Former Employee
Former Employee

If you have a set expression in your measure that defines a new set of dates, this should have precedence over the selection.

Try
{<Date*={">=$(=monthstart(today(),1))"}>}
instead of 
{<Date={">=$(=monthstart(today(),1))"}>}

Then you will get the intersection between the two. See more on https://community.qlik.com/t5/Design/Implicit-Set-Operators/ba-p/1475624

HIC

 

Ramina
Contributor II
Contributor II
Author

Hey Hic, thank you - it functioned! Just a question, what does this * actually do before the 'Date'?