Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following table:
City1 | Latitude | Longitude | ||
Chak Forty M | 29.739618 | 71.633704 | ||
Chak Forty M | 32.202049 | 71.755182 | ||
Chak Forty M | 32.015943 | 71.581087 | ||
Chak Forty SB | 31.926389 | 72.826389 | ||
Chak Forty | 30.696667 | 73.446944 | ||
Chak Four | 26.434703 | 68.565174 | ||
Chak Four | 28.0137 | 67.705a2 | ||
Chak Four | 28.419416 | 70.181164 |
I want to show only the first column in the straight or pivot table without hardcoding the City.
I tried using FirstSortedValue function but was not able to get the result.
Can any one help me on this.
Thanks.
can you please explain a little bit better with some example if possible...
try to use:
=only({<$FieldNo={1},$Table={'TableName'}>}$Field)
where TableName is name of your table.
regards
Darek
Create an Inline table containing all field names you want to use, and the implement the following expression:
$(=FirstSortedValue(FieldNames,Order))
This works for me..
not sure to undestand but if this is your requirement
you can try adding a counter (see script below) and then use it in expression firstsortedvalue (see lable in image)
load *, rowno() as row;
load * inline [
City1, Latitude, Longitude
Chak Forty M ,29.739618 ,71.633704
Chak Forty M ,32.202049 ,71.755182
Chak Forty M ,32.015943 ,71.581087
Chak Forty SB ,31.926389 ,72.826389
Chak Forty ,30.696667 ,73.446944
Chak Four ,26.434703 ,68.565174
Chak Four ,28.0137 ,67.70502
Chak Four ,28.419416 ,70.181164
];
or if you want just a column try with a dimension like
=[$(=minstring ({1<[$Table]={TableName},[$FieldNo]={1}>} $Field) )]
it works when using dollar sign expansion on the previously suggested expression by Darek (credits to him):
=$(=only({<$FieldNo={$(vFieldSelector)},$Table={'tabCities'}>}$Field))
regards
Marco