Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We want column headers in columns as following
if in month listbox continuous months are selected, i.e Jan, Feb , Mar then 'Jan to Mar'
otherwise if Jan and March selection then concatenation of Months as 'Jan,Mar' in column headers.
Please me if some one has done same thing in past.
Regards,
Navdeep
Take this:
=if(num(max(Month))-num(min(Month))+1=GetSelectedCount(Month),maxstring({<Num={$(=min(Num))}>}Month)&'-'&maxstring({<Num={$(=max(Num))}>}Month)
,concat(Month,','))
Add a field Num in your calendar where the monthnumber is in.
Unfortunaly the concated values of months are sorted by string, not by number,
Regards
=GetFieldSelections(YourFieldName)
This will give you selected field name.
hiiii Navdeep,
use getfieldselections(FieldName) function to get your desired result.
Regards,
Rohit
I don't want all field names in case of continuous selection, only min and max otherwise field names.
Hi
If the user select May, Jul and Dec, In that case, how do you need to display in the column header?
Try like below,
=If(GetSelectedCount(Month)=2, Concat(Getfieldselections(Month),','),
Subfield(GetFieldSelections(Month,',',12),',',1) &' To ' & Subfield(GetFieldSelections(Month,',',12),',',GetSelectedCount(Month)))
Change Month to your field name.
Or simply try this.
=If(GetSelectedCount(Month)>0, Concat(Getfieldselections(Month,',',12),','))
all three of them May,Jul, Dec. You can just relate it to how Qlikview shows data when user make selection in Month selection.
Hi Nagraj,
That 2 column thing was just an example, actually we can have any number of discontinuous selection, in that case you solution will give x to y. Correlate it with Qlikview data selection.
It's not giving correct O/P.
Can you post the incorrect output or explain what is wrong!!