UI-GRID Single Input Filtering - angular-ui-grid

Whats the best way to handle grid filtering with one input. Is there a simpler way then dealing with it this way:
http://ui-grid.info/docs/#/tutorial/321_singleFilter
I also want to filter with every keystroke, not click a button.
Thanks

If you are looking at filtering on multiple columns, thats probably the best way. To make it filter on every key stroke, you can add a "ng-change" to the text input and call the filter function as in the example.
<input ng-model='filterValue' ng-change='filter()'/>
if you have a large dataset and you filter on every key stroke, there will be performance lag unless you handle it properly inside the filter function.

Related

How do I get the top N filter to show the correct values in Tableau?

I am trying to show the top-most delayed airline routes in this dataset. Whenever I leave it unfiltered, I can see the most delayed set that I want to show. However, as soon as I apply a top N filter, it gives me a different list. I'm not sure what's happening here or how to fix it.
Link to workbook https://public.tableau.com/app/profile/shannon.ashberry/viz/FlightDelaysandCancellations_16448265391280/Top10MostDelayedRoutes?publish=yes
I hope the community can help.
Thanks,
Shannon
What I get
What I want
You probably want some of your filters to be applied first, and then compute the top 10 filter upon the results that pass the first filter. To make a filter take effect earlier, you can right click on the field in the filter shelf and add it to the context of your viz.
Search for “order of operations” in the tableau help for more info.

Google Spreadsheet Query; Keep Background Color

I have a spreadsheet with a whole bunch of data, where parts of it are queried to present in more readable ways. The problem is that the initial data also has background colors set, which are not taken over by the query result. Is there an easy way to do this?
Unfortunately this is not possible, because formulas do not transfer background colors. the only way is to use script, or set up some conditional formatting rule.
the easiest way would be to use conditional formatting to re-create the background color. custom formula would be:
=D1="test1"
applied to range D1:D

Conditional formatting based on previous cell

I have a list of times in a table that I want to apply some conditional formatting to. I just want them to turn different colours based on whether they're later or earlier than the time in the previous cell. I'm having trouble figuring out the appropriate rule though.
More specifically I'm having trouble thinking of a formula for the rule that I can apply to the whole range of times given in the table. What I need is basically the condition =[current cell]>[current cell-1] and vice versa but don't know how to write this in a formula that I can apply as a rule for the whole range.
How to accomplish this?
Custom Formula:
=B1<A1
Apply to:
B1:Z1
or
B:Z
Color:Green
Add another conditional formula for Red.
See explanation here

sumif function in excel to display percentage based on text

I am attempting to display a progress percentage in a single cell based on the choice of "completion" from a data validation list that spans multiple columns and cells.
I have attached a screen grab that will hopefully better explain. I would like the "Overall status cell (B3) to display the percentage of "Completes" that will track overall progress of requirements.
I have narrowed to a "sumif" function based on research and former templates but cannot achieve the desired result. Any help would be excellent. Thank you in advance.
You would want to do a =(COUNTIF(C5:C100, "Completed")/COUNTA(C5:C100)).
Obviously, you might want to change the range.
E2A: =SUMIF adds numbers together. Because you're looking at Text, you'll want to do a =COUNTIF and =COUNTA.

change a content/variable at a later time in rails?

i tried looking at capture, yield, content_for don't think any of these is the solution.
i'm trying to create a reports, calculating and looping column by column, row by row.
But i need to display an average for each of the column, but i will not be able to calculate the average not until i have the totals for each of my rows.
by the time I have finished showing all the totals, the HTML table has been rendered. now without using Javascript, is there anything i can do like a "placeholder" that i can put in the table that i can reference and at a later stage?
Sounds like you are trying to do these calculations in the view. I would suggest doing it in the controller looping through your data. Try keeping out heavy calculations from views.

Resources