Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Position should come 1 2 3 4 5 in order wise and Others field should come bottom of the table (in last row)
Hi,
You can set the Sort order and as per that the null will go at bottom.
Go to Properties of chart -> Sort -> Take "Position" field on top.
Regards,
Kaushik Solanki
If we take "Position field" on top Null value is coming on first row but Null value should come bottom side after Position 1 2 3 4 5.
Please suggest me how to proceed to sort it out this issue.
Maybe sort it by
Properties>Sort>Category>Expression>
rank(aggr([Candidate Name]='Others',[Candidate Name])) and then select Ascending.
Hi,
What is the data type for the position field? I would try setting it to a integer. Select settings, document properties, number tab, select the position field and make it an integer. Then try to sort ascending
Kamiel
You can create a mapping table and load ordering on category column, involves two load statements.
Or simply sort on two columns as attached
Hi Arjun,
If Position value is always '-' or null for "Others", then I think this can help you out.
In Properties>Sort>Expression
=if(Position ='-',999999999,F1) { Keep ascending}
if its a null value
=if(IsNull(Position ),999999999,F1)
Hi Arjun,
Go to Properties -> Sort -> Expression -> Select Ascending -> Copy and paste the below expression
If(Len(Trim(Position))=0,Max(Total Position)+1,Position)
Nagaraj expression will work perfectly on the front end. In case if you need to resolve on the script side then the following will work:
Source_Data:
LOAD * INLINE [
Constituency,CandidateName,Category,PartyFullForm,Position,TotalVotes
Ajagara (SC),Others,,,,17347
Ajagara (SC),TRIBHUVAN RAM,SC,Bahujan Samaj Party,1,60239
Ajagara (SC),LALJI,SC,Samajwadi Party,2,58156
Ajagara (SC),HARINATH,SC,Bharatiya Janata Party,3,22855
Ajagara (SC),SANT KUMAR,SC,Apna Dal,4,16563
Ajagara (SC),MEVA LAL BAGI,SC,Indian National Congress,5,11054];
Final_Data:
NoConcatenate
Load *,RecNo() as X
Resident Source_Data
Order by Position desc;
Drop Table Source_Data;
yes its working right