Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
the expression and variables below work except when making multiple selections on fields [Ref Qualified Week Ending] or field [Week Ending]. Returns null() when making multiple selections on fields [Ref Qualified Week Ending] or [Week Ending]
vGetQualfWeekEnding =
if(GetSelectedCount([Ref Qualified Week Ending])>0,Date(GetFieldSelections([Ref Qualified Week Ending]),'MM/DD/YYYY'), if(GetSelectedCount([Week Ending])>0, Date(GetFieldSelections([Week Ending]),'MM/DD/YYYY'),'*'))
or this
vGetQualfWeekEnding =
if(GetSelectedCount([Ref Qualified Week Ending])>0,
CONCAT(distinct Date([Ref Qualified Week Ending],'MM/DD/YYYY'),','),
if(GetSelectedCount([Week Ending])>0, CONCAT(distinct Date([Week Ending]),'MM/DD/YYYY'),','), '*' )
)
Hi Jim,
That's expected behaviour. If the count > 0 then multiple dates are used, you may need an aggregation such as Max, Min, etc. to be used on Ref Qualified Week Ending and Week Ending
Cheers,
Luis
So, you can apply date formating in your load statement for your two fields in order to avoid to use Date() in your expression.
so I use this same logic on three other fields and return multiple values
vGetQualfYear =
if(GetSelectedCount([Ref Qualified Year])>0,GetFieldSelections([Ref Qualified Year]),if(GetSelectedCount([Year])>0, GetFieldSelections([Year]),'*'))
vGetQualfMonth =
if(GetSelectedCount([Ref Qualified Month])>0,GetFieldSelections([Ref Qualified Month]),if(GetSelectedCount([Month])>0, GetFieldSelections([Month]),'*'))date
I do not want the max or min [Ref Qualified Week Ending] dates if we select three dates I need them all
Ok, then you may need to format the dates on the load instead.
Remember that getfieldselections returns a string and you may need to configure that string,. What would happen is ALL dates are selected, of ALL but one or two. How many dates do you want listed, etc.
Hi
In that case, you can try like below
GetFieldSelections([Ref Qualified Week Ending], ',', 1000)
Third Parameter is nothing but you can mention Max values, for example, I mentioned 1000. And also, recommend to use date format in back end itself.
What about this
vGetQualfWeekEnding =
if(GetSelectedCount([Ref Qualified Week Ending])>0,
CONCAT(Date([Ref Qualified Week Ending],'MM/DD/YYYY'),','),
if(GetSelectedCount([Week Ending])>0, CONCAT(Date([Week Ending]),'MM/DD/YYYY'),','), '*' )
)
or this
vGetQualfWeekEnding =
if(GetSelectedCount([Ref Qualified Week Ending])>0,
CONCAT(distinct Date([Ref Qualified Week Ending],'MM/DD/YYYY'),','),
if(GetSelectedCount([Week Ending])>0, CONCAT(distinct Date([Week Ending]),'MM/DD/YYYY'),','), '*' )
)
Thanks!
This was very helpful.
=if(GetSelectedCount([Ref Qualified Week Ending])>0,
CONCAT(Distinct Date([Ref Qualified Week Ending],'MM/DD/YYYY'),','),
if(GetSelectedCount([Week Ending])>0, CONCAT(Distinct Date([Week Ending],'MM/DD/YYYY'),','),'*'))