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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
DevelopCal
Contributor III
Contributor III

Date picker in set analysis

How can i add the month selected in the "date picker" and recalculate the following KPI depending on selection?

=Money(avg(distinct{<Month={"$(vMesultimo)"}>}PayingCustomer),'###,##€',',','.')

 

vMesultimo=Date(Max(Month),'YYYY-MM-DD')

 

Thanks!

Labels (1)
4 Replies
sunny_talwar
MVP
MVP

How is Month field created in the script? Is it just Month(Date) as Month or do you have Month stored as a Date?

DevelopCal
Contributor III
Contributor III
Author

just Month in the loading script

DevelopCal
Contributor III
Contributor III
Author

is there any option?

Anil_Babu_Samineni
MVP
MVP

@DevelopCal  

Let's say you have DateField and You've associated model, The below expression will give by default filter selection

=Money(avg(distinct{<Month={"$(vMesultimo)"}>}PayingCustomer),'###,##€',',','.')

In case, If you want to use the same what you have done in the date picket

=Money(avg(distinct{<DateField=P(DateField), Month={"$(vMesultimo)"}>}PayingCustomer),'###,##€',',','.')

In case, If you required to get Max Date - Then you can call as

=Money(avg(distinct{<DateField={"$(=Max(DateField))"}, Month={"$(vMesultimo)"}>}PayingCustomer),'###,##€',',','.')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful