Hi Gurus,
Hope you can help. Iโve created a SLICE on the columns Iโd like to see. How could I arrange a column within the SLICE to descending order (highest to lowest value) and limit the rows to 10 only (that is to say only the top 10).
So far the only condition I have in my slice is [ACTIVITY] = โRIDEโ but want to include the other conditions.
Thanks in advance!
Tony
Solved! Go to Solution.
Hi @Tony_Insua,
Good to know it works.I may mention here that this solution is by @Steve and not me. I just added a minor condition based on your latest update. I thought @Steve mightt have retired for the day and you are active on the community portal, so I may add that small update to save you some time.
Regarding sorting by highest to lowest, may we know how you are presenting this slice information. You may use โSort Byโ option to sort column on โDistance Rideโ column ( descending) in deck and table views under UX --> Views --> Table or Deck View --> View Options
Highest to lowest what?
What are you trying to accomplish with is one slice?
Highest to lowest DISTANCE RIDE limit to 10 rows only. In gsheets that would be selecting the column Distance Ride ORDER BY DESC LIMIT 10 in a query. Not sure how to do that here in the slice.
So you want the slice to include only the top 10 longest-distance rides?
IN(
[_THISROW],
TOP(
ORDERBY(
FILTER("table-slice-uses", TRUE),
[DISTANCE_RIDE],
TRUE
),
10
)
)
Replace table-slice-uses
with the name of the table the slice is based on.
Hi Steve,
Thanks. Iโve placed this expression the ROW FILTER CONDITION. It netted me the following table.
This did not include any of the [ACTIVITY] = โRIDEโ rather other activities included. Iโd like to filter just the โRIDEโ activities LONGEST DISTANCE, Top 10 from Highest to Lowest. Hereโs what I tried but doesnโt seem to work:
SLICE
Please try
IN(
[_THISROW],
TOP(
ORDERBY(
FILTER(โACTIVITY DATAโ, [ACTIVITY]=โRIDEโ),
[DISTANCE_RIDE],
TRUE
),
10
)
)
@Suvrutt_Gurjar this is fantastic! Worked great, thank you. One minor question if possible. How could I change the order so that the Distance Ride is shown from highest to lowest from the top? Currently, this shows lowest to highest from the top.
Thanks!
Hi @Tony_Insua,
Good to know it works.I may mention here that this solution is by @Steve and not me. I just added a minor condition based on your latest update. I thought @Steve mightt have retired for the day and you are active on the community portal, so I may add that small update to save you some time.
Regarding sorting by highest to lowest, may we know how you are presenting this slice information. You may use โSort Byโ option to sort column on โDistance Rideโ column ( descending) in deck and table views under UX --> Views --> Table or Deck View --> View Options
Hi Suvrutt,
Thanks to both of you.
So what I think would be best to show this information would be to have this SLICE part of a DASHBOARD view called โTop Effortsโ in which would be a combination of a Filter View with buttons that includes RIDE, RUN, YOGA, etc in which when selected, would showcase the associated SLICE in a TABLE view.
Iโm reading up on how I can do this but not sure if itโs possible. The columns are different between the activities so weโll see.
Still learning as much as I can!
Thanks
Hi @Tony_Insua ,
If you are using table view for the slice ,you should be able to use the โSort Byโ option in table viewโs settings under UX --> Views
Hi @Tony_Insua,
You have mentioned user based inputs in the dashboard. You may wish to take a look at the following sample app. Ofcourse, the app is meant for catering to inputs from one user. You may need to have a separate user table to store selection inputs by each user in the dashboard.
Hi @Suvrutt_Gurjar itโs funny you mention the sample app - thatโs exactly what I have infront of me to study. Iโll dive into this and play around with App Sheets to achieve this.
Your โSort Byโ suggestion on the Table View actually worked in terms of presenting Highest to Lowest โ thank you!
The next big thing that Iโm trying to read up more on is CHARTS. I havenโt been able to find any example apps that are truly rich with great charting and how toโs. Any advice in pointing me in the right direction? I find itโs been difficult as you canโt arbritarily pick the X and Y axises like in google sheets. Maybe of for another topicโฆ
Thanks for all your help!
Hi @Tony_Insua,
Great to know the sample app is relevant to you.
For graphs and charts,if you wish to explore more options, the AppSheet team and our community colleagues @tsuji_koichi ,@Fabian have shared in some very innovative tips and tricks in the Tips and Tricks section. Please simply search by โChartsโ and โGraphsโ
Hi @Suvrutt_Gurjar
I wonder if you know what the following issue is with this new problem Iโm faced with the expression.
Iโve reorganized my table in google sheets so that โRIDEโ and โINDOOR BIKE TRAINERโ share some similar columns instead of all exclusively separate columns which I had done in the past. When I try the formulation below, I donโt seem to be getting the same result in terms of ordering the DISTANCE column from Lowest to Highest which is what Iโm looking for. It seems that there is no order at all. The ACTIVITY = โRIDEโ seems to work (as it does not include any INDOOR BIKE TRAINER activities but thereโs no order in the DISTANCE column like before. Hereโs a screen shot of the table: Distance is not in any order. I wonder whatโs change? Any insights or articles on how to solve for this?
Thanks
Expression Used (per your original suggestion):
IN(
[_THISROW],
TOP(
ORDERBY(
FILTER(โACTIVITY DATAโ, [ACTIVITY]=โRIDEโ),
[DISTANCE],
TRUE
),
10
)
)
This expression comes back all TRUE and it worked before but not in this new way.
You seem to have changed the name of "Distance"column to [Distance] from [Distance_Ride]
Hope eyou have accordingly changed the "Sort By"column setting in the table view. Please note that the sorted order will reflcet in your table view in the app and not in the backend data source table.
Hi Survrutt, thanks! You were correct, the order is set in the โSORY BYโ column setting in the UX. Thanks for the reminder agian. Cheers
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |