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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Raju_6952
Creator III
Creator III

Ignoring selections in Set expression

Hi,

I am displaying max value of one particluar measure in kpi and my requirement is to display the maximum value of current and even if I select other dates also it should remain uneffected on that KPI,

Sum({<Date={'$(=max(Date))'},Name={'EPI'}>}value) using this formula currently but its changing when I select other dates without the current date.

 

any suggestions would be highly appreciated.

Thanks in Advance,

Raju

 

Labels (1)
2 Replies
ali_hijazi
Partner - Master II
Partner - Master II

that's because the max(Date) is affected by other selections so the maximum is not always the same
so you either ignore selections on specific fields inside the max() or you use the whole set of data {1}
so your expression would be something like
Date={"$(=max({1}Date)"}
or if you want to ignore all possible selections made on the fields of the calendar you could write something like:
{<$(='[' &concat(distinct{<$Table={calendar}>}$Field,'],[') &']')>}
change the table name to the appropriate name of your calendar table in your schema

I can walk on water when it freezes
MayilVahanan

Hi

 

Depends on the requirement, Try like below

Sum({<Date={'$(=max({1}Date))'},Name={'EPI'}>}value)

or

Sum({<Date={'$(=max({<DateField=, YearField=, TimeFilters=>}Date))'},Name={'EPI'}>}value)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.