Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
How is Month field created in the script? Is it just Month(Date) as Month or do you have Month stored as a Date?
just Month in the loading script
is there any option?
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),'###,##€',',','.')